-
Notifications
You must be signed in to change notification settings - Fork 44
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
pkt.hrl contains Linux specific values #23
Comments
msantos
added a commit
that referenced
this issue
Jan 29, 2015
The NULL linktype used by the loopback interface on BSD systems uses the PF_* value to indicate the next data type. For IPv6, the value of PF_INET6 was (amusingly) hardcoded to the value on linux systems and so decoding of IPv6 NULL packets has always been broken. The NULL linktype is unusual because it depends on runtime values: the protocol family, which differs by OS and the native host endianness for packing the protocol family. Deal with this by looking up the protocol family and endianness at runtime. Note this means that IPv6 BSD NULL packets cannot be decoded on other OS'es (the PF_INET6 value may differ) or on architectures of the opposite endianness. Reported in: #23 Thanks to 2b-as for reporting the problem!
Thanks! I pushed a fix. I've left the value of PF_INET6 in the header for now. Nothing should be using it but I still need to check. |
msantos
added a commit
that referenced
this issue
Jan 30, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Values in pkt.hrl are hardcoded to their Linux values (e.g. -define(PF_INET6, 10)), but these values differ from OS to OS.
The text was updated successfully, but these errors were encountered: