Cong Wang
da8c87241c
vlan: adjust vlan_set_encap_proto() for its callers
...
There are two places to call vlan_set_encap_proto():
vlan_untag() and __pop_vlan_tci().
vlan_untag() assumes skb->data points after mac addr, otherwise
the following code
vhdr = (struct vlan_hdr *) skb->data;
vlan_tci = ntohs(vhdr->h_vlan_TCI);
__vlan_hwaccel_put_tag(skb, vlan_tci);
skb_pull_rcsum(skb, VLAN_HLEN);
won't be correct. But __pop_vlan_tci() assumes points _before_
mac addr.
In vlan_set_encap_proto(), it looks for some magic L2 value
after mac addr:
rawp = skb->data;
if (*(unsigned short *) rawp == 0xFFFF)
...
Therefore __pop_vlan_tci() is obviously wrong.
A quick fix is avoiding using skb->data in vlan_set_encap_proto(),
use 'vhdr+1' is always correct in both cases.
Cc: David S. Miller <davem@davemloft.net >
Cc: Jesse Gross <jesse@nicira.com >
Signed-off-by: Cong Wang <amwang@redhat.com >
Acked-by: Jesse Gross <jesse@nicira.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2013-02-23 21:00:06 -05:00
..
2013-02-08 13:16:17 -05:00
2013-01-28 18:17:25 -05:00
2013-01-24 11:12:23 -08:00
2013-02-20 11:00:43 -08:00
2013-02-20 10:19:07 -08:00
2013-02-07 23:26:12 -05:00
2013-02-05 04:07:35 +01:00
2013-02-15 09:52:29 +01:00
2013-02-20 18:58:50 -08:00
2013-02-16 13:34:10 -08:00
2013-02-07 20:51:08 +01:00
2013-02-11 00:05:31 +00:00
2013-02-08 13:16:17 -05:00
2013-02-09 07:55:24 +11:00
2013-02-13 13:46:45 +01:00
2013-01-03 14:34:06 -08:00
2013-01-23 09:32:30 -08:00
2013-01-03 15:57:16 -08:00
2013-01-14 13:29:15 -05:00
2013-01-11 14:54:56 -08:00
2013-02-15 18:52:45 -08:00
2013-01-24 12:05:18 -08:00
2013-01-24 11:09:28 -08:00
2013-01-31 22:15:36 +01:00
2013-01-11 14:54:56 -08:00
2013-01-26 17:37:17 +01:00
2013-01-11 14:54:54 -08:00
2013-02-02 01:29:32 +01:00
2013-02-11 18:49:51 -05:00
2013-01-09 08:26:53 -08:00
2013-01-23 16:39:51 +01:00
2013-01-30 11:51:59 -08:00
2013-01-18 14:05:56 -08:00
2013-01-21 14:07:44 -05:00
2013-02-09 22:32:48 +01:00
2013-01-30 11:02:06 -05:00
2013-01-21 13:22:35 -05:00
2013-02-19 18:19:48 -08:00
2013-01-25 21:03:54 -08:00
2013-02-15 09:41:42 +01:00
2013-02-06 15:59:47 -05:00
2013-02-06 15:48:09 -05:00
2013-02-23 21:00:06 -05:00
2013-02-11 14:16:26 -05:00
2013-01-29 13:59:57 -05:00
2013-02-19 08:06:01 +01:00
2013-01-23 09:31:01 -08:00
2013-01-11 14:54:54 -08:00
2013-01-04 16:11:45 -08:00
2013-01-30 22:41:13 -05:00
2013-02-05 00:48:46 +01:00
2013-01-28 12:17:25 +01:00
2013-01-27 19:23:27 +01:00
2013-01-21 13:22:36 -05:00
2013-01-27 20:35:47 +01:00
2013-01-14 13:29:15 -05:00
2013-01-06 01:11:25 -08:00
2013-01-11 14:54:55 -08:00
2013-02-02 00:01:15 +01:00
2013-02-05 20:38:48 +11:00
2013-01-28 18:42:10 -05:00
2013-01-11 14:54:56 -08:00
2013-02-05 20:38:48 +11:00
2013-01-04 16:11:46 -08:00
2013-01-12 13:27:05 +10:30
2013-01-21 13:55:14 -05:00
2013-01-21 13:55:14 -05:00
2013-01-04 16:11:45 -08:00
2013-02-15 15:17:11 -05:00
2013-02-19 13:18:13 -05:00
2013-02-11 19:19:33 -05:00
2013-02-13 10:11:53 +00:00
2013-02-13 10:09:31 +00:00
2013-02-07 23:47:01 -05:00
2013-01-24 17:25:13 +01:00
2013-02-08 18:28:02 +01:00
2013-01-14 15:11:50 -05:00
2013-01-23 14:39:19 +00:00
2013-01-26 00:39:12 +01:00
2013-02-17 23:37:09 -05:00
2013-01-05 18:51:18 -08:00
2013-02-19 13:18:13 -05:00
2013-01-24 15:37:26 +01:00
2013-01-03 15:57:14 -08:00
2013-01-20 12:26:05 -08:00
2013-02-08 13:14:40 +00:00
2013-01-23 13:44:00 -05:00
2013-01-11 14:54:56 -08:00
2013-01-28 22:25:21 -08:00
2013-02-14 17:11:09 +00:00
2013-01-30 11:01:53 -05:00
2013-01-15 18:16:06 -08:00
2013-01-16 12:13:20 -08:00
2013-02-20 09:16:21 -08:00
2013-01-14 18:16:59 -05:00
2013-02-15 15:17:11 -05:00
2013-02-14 15:29:37 +01:00
2013-02-10 19:41:08 -05:00
2013-02-07 15:15:00 -08:00
2013-02-09 22:30:44 +01:00
2013-01-25 21:51:13 +01:00
2013-02-13 13:22:15 -05:00
2013-02-05 00:48:46 +01:00
2013-02-08 15:07:05 -08:00
2013-01-27 19:23:31 +01:00
2013-02-08 18:28:04 +01:00
2013-01-25 15:06:01 -08:00
2013-01-27 20:35:47 +01:00
2013-01-31 19:56:35 -05:00
2013-02-08 10:05:02 +02:00
2013-02-13 19:29:12 -08:00