How to set a fixed path MTU in SCTP_PEER_ADDR_PARMS on an SCTP socket

Solution Verified - Updated -

Issue

  • Unable to set a fixed path MTU in SCTP_PEER_ADDR_PARMS on an SCTP socket. The setsockopt() 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(&params, 0, sizeof(params));  

if (getsockopt(s,IPPROTO_SCTP,SCTP_PEER_ADDR_PARAMS, &params, &len)) {  
    perror("getsockopt");  
    exit(1);  
}  
params.spp_pathmtu = new_pathmtu;  
if (setsockopt(s,IPPROTO_SCTP,SCTP_PEER_ADDR_PARAMS, &params, len)) {
    perror("setsockopt");  
    exit(1); 
}

Environment

  • Red Hat Enterprise Linux
  • Stream Control Transmission Protocol (SCTP)
  • setsockopt() call to set SCTP_PEER_ADDR_PARAMS parameter

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.