Closed w910820618 closed 5 years ago
Thanks for reporting. This is however not a bug, but the way the Linux SCTP API is exposed to userland program. I understand this is not very Python-friendly, but I prefer to keep it as is, and let the application deal with it (see e.g. https://github.com/P1sec/pycrate/blob/af18a03548032b6016bbbcffeda35a4d6f0faf7d/pycrate_corenet/Server.py#L534).
This could be good also that you set a proper title to the issue, such as "SCTP payload protocol ID argument issue"
I found a small bug in your program. The problem is sctp_sendmsg used in the sctp_send_msg() method in the _sctp.c file. You directly pass ppid through sctp to cause the value of ppid to be wrong. You should use htonl(ppid), so there is no problem.