Skip to content

0.4.3

@msantos msantos tagged this 29 Jan 19:01
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:

https://github.com/msantos/pkt/issues/23

Thanks to 2b-as for reporting the problem!
Assets 2
Loading