]> git.ipfire.org Git - thirdparty/pdns.git/commit - pdns/dnspcap.cc
dnspcap: Decode IPv6 packets in DLT_RAW captures correctly
authorRobert Edmonds <edmonds@fsi.io>
Sat, 16 Apr 2016 00:36:19 +0000 (20:36 -0400)
committerRobert Edmonds <edmonds@fsi.io>
Sat, 16 Apr 2016 00:36:19 +0000 (20:36 -0400)
commit3ae047fe009d35c4ad62f09c08d68f94225b9d7c
treedcb9b03aab5e1376f787e2dc05871339b27cec24
parent9be880929b2f0b110f6e1c486aa9cddcc7cab910
dnspcap: Decode IPv6 packets in DLT_RAW captures correctly

DLT_RAW captures (linktype 101) were not handling IPv6 packets
correctly.

For DLT_RAW, PcapPacketReader::getUDPPacket() synthesizes a fake
ethertype value (the "contentCode" variable), but for IPv6 it was
incorrectly set to 0x0806 (ARP) instead of 0x86dd (IPv6). This caused
IPv6 packets to silently be discarded.
pdns/dnspcap.cc