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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content