alistair23-linux/net/core
Eric Dumazet d4b812dea4 vlan: mask vlan prio bits
In commit 48cc32d38a
("vlan: don't deliver frames for unknown vlans to protocols")
Florian made sure we set pkt_type to PACKET_OTHERHOST
if the vlan id is set and we could find a vlan device for this
particular id.

But we also have a problem if prio bits are set.

Steinar reported an issue on a router receiving IPv6 frames with a
vlan tag of 4000 (id 0, prio 2), and tunneled into a sit device,
because skb->vlan_tci is set.

Forwarded frame is completely corrupted : We can see (8100:4000)
being inserted in the middle of IPv6 source address :

16:48:00.780413 IP6 2001:16d8:8100:4000:ee1c:0:9d9:bc87 >
9f94:4d95:2001:67c:29f4::: ICMP6, unknown icmp6 type (0), length 64
       0x0000:  0000 0029 8000 c7c3 7103 0001 a0ae e651
       0x0010:  0000 0000 ccce 0b00 0000 0000 1011 1213
       0x0020:  1415 1617 1819 1a1b 1c1d 1e1f 2021 2223
       0x0030:  2425 2627 2829 2a2b 2c2d 2e2f 3031 3233

It seems we are not really ready to properly cope with this right now.

We can probably do better in future kernels :
vlan_get_ingress_priority() should be a netdev property instead of
a per vlan_dev one.

For stable kernels, lets clear vlan_tci to fix the bugs.

Reported-by: Steinar H. Gunderson <sesse@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-18 13:05:23 -07:00
..
datagram.c net: rename include/net/ll_poll.h to include/net/busy_poll.h 2013-07-10 17:08:27 -07:00
dev.c vlan: mask vlan prio bits 2013-07-18 13:05:23 -07:00
dev_addr_lists.c net/core: dev_mc_sync_multiple calls wrong helper 2013-05-31 16:56:56 -07:00
dev_ioctl.c net: fix kernel deadlock with interface rename and netdev name retrieval. 2013-06-26 13:42:54 -07:00
drop_monitor.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
dst.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
ethtool.c ethtool: fixed trailing statements in ethtool 2013-07-16 12:14:51 -07:00
fib_rules.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
filter.c sock_diag: fix filter code sent to userspace 2013-06-10 22:23:32 -07:00
flow.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-04-01 13:36:50 -04:00
flow_dissector.c net: flow_dissector: add __skb_get_poff to get a start offset to payload 2013-03-20 13:15:45 -04:00
gen_estimator.c net_sched: add 64bit rate estimators 2013-06-11 02:51:03 -07:00
gen_stats.c net_sched: add 64bit rate estimators 2013-06-11 02:51:03 -07:00
iovec.c Hoist memcpy_fromiovec/memcpy_toiovec into lib/ 2013-05-20 10:24:22 +09:30
link_watch.c net: make all team port device link events urgent 2013-06-13 02:31:41 -07:00
Makefile net: move procfs code to net/core/net-procfs.c 2013-02-19 00:51:10 -05:00
neighbour.c neighbour: fix a race in neigh_destroy() 2013-07-01 13:35:32 -07:00
net-procfs.c rps: selective flow shedding during softnet overflow 2013-05-20 13:48:04 -07:00
net-sysfs.c rps_dev_flow_table_release(): no need to delay vfree() 2013-05-06 11:06:51 -04:00
net-sysfs.h
net-traces.c
net_namespace.c proc: Split the namespace stuff out into linux/proc_ns.h 2013-05-01 17:29:39 -04:00
netevent.c
netpoll.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
netprio_cgroup.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
pktgen.c pktgen: ipv6: numa: consolidate skb allocation to pktgen_alloc_skb 2013-06-12 00:47:25 -07:00
request_sock.c
rtnetlink.c rtnetlink: allow using zero MAC address in rtnl_fdb_{add,del} 2013-06-25 09:31:39 -07:00
scm.c netprio_cgroup: remove task_struct parameter from sock_update_netprio() 2013-04-09 13:19:37 -04:00
secure_seq.c net: defer net_secret[] initialization 2013-04-29 15:14:02 -04:00
skbuff.c net: access page->private by using page_private 2013-07-12 16:10:34 -07:00
sock.c net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
sock_diag.c sock_diag: fix filter code sent to userspace 2013-06-10 22:23:32 -07:00
stream.c
sysctl_net_core.c net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
timestamping.c
user_dma.c
utils.c net: core: move mac_pton() to lib/net_utils.c 2013-06-05 12:00:27 -07:00