linux/net
Shmulik Ladkani d65f2fa680 net/sched: em_meta: Fix 'meta vlan' to correctly recognize zero VID frames
META_COLLECTOR int_vlan_tag() assumes that if the accel tag (vlan_tci)
is zero, then no vlan accel tag is present.

This is incorrect for zero VID vlan accel packets, making the following
match fail:
  tc filter add ... basic match 'meta(vlan mask 0xfff eq 0)' ...

Apparently 'int_vlan_tag' was implemented prior VLAN_TAG_PRESENT was
introduced in 05423b2 "vlan: allow null VLAN ID to be used"
(and at time introduced, the 'vlan_tx_tag_get' call in em_meta was not
 adapted).

Fix, testing skb_vlan_tag_present instead of testing skb_vlan_tag_get's
value.

Fixes: 05423b2413 ("vlan: allow null VLAN ID to be used")
Fixes: 1a31f2042e ("netsched: Allow meta match on vlan tag on receive")

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-23 17:31:25 -04:00
..
6lowpan
9p
802 net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
8021q net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
appletalk
atm net: remove MTU limits on a few ether_setup callers 2016-10-21 13:57:50 -04:00
ax25
batman-adv net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
bluetooth net: remove MTU limits on a few ether_setup callers 2016-10-21 13:57:50 -04:00
bridge net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
caif
can
ceph
core bpf: add helper for retrieving current numa node id 2016-10-22 17:05:52 -04:00
dcb
dccp
decnet
dns_resolver
dsa net: remove MTU limits on a few ether_setup callers 2016-10-21 13:57:50 -04:00
ethernet
hsr net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
ieee802154
ipv4 udp: use it's own memory accounting schema 2016-10-22 17:05:05 -04:00
ipv6 udp: use it's own memory accounting schema 2016-10-22 17:05:05 -04:00
ipx
irda net: remove MTU limits on a few ether_setup callers 2016-10-21 13:57:50 -04:00
iucv
kcm
key
l2tp net: remove MTU limits on a few ether_setup callers 2016-10-21 13:57:50 -04:00
l3mdev
lapb
llc
mac80211 net: use core MTU range checking in wireless drivers 2016-10-20 14:51:08 -04:00
mac802154
mpls
ncsi
netfilter
netlabel
netlink
netrom
nfc
openvswitch net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
packet
phonet net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
qrtr
rds rds: Remove duplicate prefix from rds_conn_path_error use 2016-10-17 11:07:22 -04:00
rfkill
rose
rxrpc
sched net/sched: em_meta: Fix 'meta vlan' to correctly recognize zero VID frames 2016-10-23 17:31:25 -04:00
sctp
strparser
sunrpc udp: use it's own memory accounting schema 2016-10-22 17:05:05 -04:00
switchdev
tipc
unix
vmw_vsock
wimax
wireless
x25
xfrm
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c