summaryrefslogtreecommitdiffstats
path: root/net/l3mdev/l3mdev.c
diff options
context:
space:
mode:
authorYoshiki Komachi <komachi.yoshiki@lab.ntt.co.jp>2019-03-18 06:39:52 +0100
committerDavid S. Miller <davem@davemloft.net>2019-03-19 02:11:40 +0100
commit18bed89107a400af0d672ec85a270f1545db2569 (patch)
treeea7fc6065e464e6daa3669458c9af2059431034c /net/l3mdev/l3mdev.c
parentpackets: Always register packet sk in the same order (diff)
downloadlinux-18bed89107a400af0d672ec85a270f1545db2569.tar.xz
linux-18bed89107a400af0d672ec85a270f1545db2569.zip
af_packet: fix the tx skb protocol in raw sockets with ETH_P_ALL
I am using "protocol ip" filters in TC to manipulate TC flower classifiers, which are only available with "protocol ip". However, I faced an issue that packets sent via raw sockets with ETH_P_ALL did not match the ip filters even if they did satisfy the condition (e.g., DHCP offer from dhcpd). I have determined that the behavior was caused by an unexpected value stored in skb->protocol, namely, ETH_P_ALL instead of ETH_P_IP, when packets were sent via raw sockets with ETH_P_ALL set. IMHO, storing ETH_P_ALL in skb->protocol is not appropriate for packets sent via raw sockets because ETH_P_ALL is not a real ether type used on wire, but a virtual one. This patch fixes the tx protocol selection in cases of transmission via raw sockets created with ETH_P_ALL so that it asks the driver to extract protocol from the Ethernet header. Fixes: 75c65772c3 ("net/packet: Ask driver for protocol if not provided by user") Signed-off-by: Yoshiki Komachi <komachi.yoshiki@lab.ntt.co.jp> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l3mdev/l3mdev.c')
0 files changed, 0 insertions, 0 deletions