fragmentation: Fix fragmentation field check
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 19 Mar 2014 21:50:36 +0000 (21:50 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 24 Apr 2014 01:09:58 +0000 (02:09 +0100)
commiteff13010d3de989ea2414048799bff36ad242fa0
tree3d5b9b458cee1adafe28b9cbec6cae301f8ba0c5
parent32240a83d9c8fe11d59b3b97a83e72991b6bfc17
fragmentation: Fix fragmentation field check

When an incoming packet is for secnet itself, secnet checks the
fragmentation field in the IP header.

(Contrary to the spec, secnet discards fragmented packets addressed to
its own private address; however, this is a tolerable defect as secnet
never sends packets of its own apart from ICMP errors and ICMP Echo
Reply.)

However, secnet would incorrectly check the reserved flag bit in the
16-bit fragmentation superfield.  Fix this.  Also introduce some
manifest constants for the bits in the 16-bit fragmentation
superfield.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
netlink.c