In my ND daemon, i am using rbos_socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
to receive ICMPv6 header for receiving NS and other ND messages (l3
messages).
With this option kernel will strip the l2
header (with VLAN information). which option should I use to avoid this stripping?
My intent is to receive ICMPv6 message with VLAN information.
Already tried using the following:
1) rbos_socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
2) rbos_socket(AF_INET6, SOCK_RAW, PROTO_ND)
My expectation is to receive ICMPv6 message with l2
information (specifically VLAN header).
You cannot get the first VLAN tag like this. It does get stripped from the packet, but it is available out-of-band in the
tp_vlan_tci
andtp_vlan_tpid
members, seelinux/if_packet.h
(assuming this is on Linux).