Skip to content

Tags: msantos/pkt

Tags

0.4.5

Toggle 0.4.5's commit message
Add license for hex.pm and tag

0.4.4

Toggle 0.4.4's commit message
Copyright heartbeat; bump version

0.4.3

Toggle 0.4.3's commit message
Fix BSD NULL (loopback) IPv6 protocol decode

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!