Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code likely needs the SCTP_EVENTS linux kernel ABI breakage work-around #149

Open
laf0rge opened this issue Dec 22, 2021 · 1 comment
Open

Comments

@laf0rge
Copy link

laf0rge commented Dec 22, 2021

The Linux kernel SCTP stack broke the ABI at least two times, and as packetdrill uses SCTP_EVENTS, I would expect it to also need a work-around like implemented in libosmo-netif or open5gs.

See https://git.osmocom.org/libosmo-netif/tree/src/stream.c#n118 or https://github.com/chensqi/new5gsim/blob/e0de5bca31865e12bda8a52533eb504a04f22937/lib/sctp/ogs-lksctp.c#L297 or https://osmocom.org/issues/4573

@tuexen
Copy link
Contributor

tuexen commented Dec 22, 2021

SCTP_EVENTS is deprecated anyway, SCTP_EVENT is the socket option which does not have the issue of no being extensible. I think the only standardised components are

 struct sctp_event_subscribe {
     uint8_t sctp_data_io_event;
     uint8_t sctp_association_event;
     uint8_t sctp_address_event;
     uint8_t sctp_send_failure_event;
     uint8_t sctp_peer_error_event;
     uint8_t sctp_shutdown_event;
     uint8_t sctp_partial_delivery_event;
     uint8_t sctp_adaptation_layer_event;
     uint8_t sctp_authentication_event;
     uint8_t sctp_sender_dry_event;
   };

all other components at the end are implementation specific. It is assumed that you run a packetdrill binary compiled for the kernel it is running on. There are some compile time checks, but I don't think there are run time checks. Since it is a testing tool, compiling it on the platform you want to test, is acceptable, I think. However, right now, you can't test any Linux specific extensions to struct sctp_event_subscribe. But I'm also not sure why it was extended multiple times, since it is deprecated since 2011.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants