How to set a fixed path MTU in SCTP_PEER_ADDR_PARMS on an SCTP socket
Issue
- Unable to set a fixed path MTU in
SCTP_PEER_ADDR_PARMS
on an SCTP socket. Thesetsockopt()
call does not return an error, but does not change the value either. - Code used to try this:
struct sctp_paddrparams params;
int len = sizeof(params);
int s = socket(AF_INET,SOCK_STREAM,IPPROTO_SCTP);
memset(¶ms, 0, sizeof(params));
if (getsockopt(s,IPPROTO_SCTP,SCTP_PEER_ADDR_PARAMS, ¶ms, &len)) {
perror("getsockopt");
exit(1);
}
params.spp_pathmtu = new_pathmtu;
if (setsockopt(s,IPPROTO_SCTP,SCTP_PEER_ADDR_PARAMS, ¶ms, len)) {
perror("setsockopt");
exit(1);
}
Environment
- Red Hat Enterprise Linux
- Stream Control Transmission Protocol (SCTP)
setsockopt()
call to setSCTP_PEER_ADDR_PARAMS
parameter
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.