Support IPv6 "next header" field
An IPv6 "next header" field can contain one of the following information:
- Transport layer protocol
- Extension header identifier
In the first case, the IPv6 header is followed by the transport layer header. This is properly supported by bpfilter.
In the second case, the IPv6 header is followed by an extension header of variable length. This extension header contains a "next header" field to identify the next header, which can be a transport layer header or another extension header. Extensions header are not supported by bpfilter: the BPF program will read the "next header" field of the IPv6 header and use it as the transport layer protocol.
If the packet contains an IPv6 extension header, the BPF program should read it to access the next header, until the transport layer header is found.