Patch "openvswitch: Fix pop_vlan action for double tagged frames" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
openvswitch: Fix pop_vlan action for double tagged frames
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
openvswitch-fix-pop_vlan-action-for-double-tagged-frames.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Sun Dec 31 11:12:48 CET 2017
From: Eric Garver <[email protected]>
Date: Wed, 20 Dec 2017 15:09:22 -0500
Subject: openvswitch: Fix pop_vlan action for double tagged frames
From: Eric Garver <[email protected]>
[ Upstream commit c48e74736fccf25fb32bb015426359e1c2016e3b ]
skb_vlan_pop() expects skb->protocol to be a valid TPID for double tagged frames. So set skb->protocol to the TPID and let skb_vlan_pop() shift the true ethertype into position for us.
--- net/openvswitch/flow.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
net/openvswitch/flow.c +12 -3
@@ -532,6 +532,7 @@ static int key_extract(struct sk_buff *sreturn -EINVAL ;skb_reset_network_header (skb); + key->eth.type = skb->protocol; }else { eth =eth_hdr (skb);ether_addr_copy (key->eth.src, eth->h_source);
@@ -545,15 +546,23 @@ static int key_extract(struct sk_buff *sif (unlikely (parse_vlan (skb, key)))return -ENOMEM ; - skb->protocol =parse_ethertype (skb); -if (unlikely (skb->protocol ==htons (0 ))) + key->eth.type =parse_ethertype (skb); +if (unlikely (key->eth.type ==htons (0 )))return -ENOMEM ; +/* Multiple tagged packets need to retain TPID to satisfy +* skb_vlan_pop(), which will later shift the ethertype into +* skb->protocol. +*/ +if (key->eth.cvlan.tci &htons (VLAN_TAG_PRESENT )) + skb->protocol = key->eth.cvlan.tpid; +else + skb->protocol = key->eth.type; +skb_reset_network_header (skb);__skb_push (skb, skb->data -skb_mac_header (skb)); }skb_reset_mac_len (skb); - key->eth.type = skb->protocol;/* Network layer. */ if (key->eth.type ==htons (ETH_P_IP )) {
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/openvswitch-fix-pop_vlan-action-for-double-tagged-frames.patch