Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[cascardo/linux.git] / net / openvswitch / flow.c
index 634cc10..c8c82e1 100644 (file)
@@ -633,12 +633,7 @@ static int key_extract(struct sk_buff *skb, struct sw_flow_key *key)
        } else if (eth_p_mpls(key->eth.type)) {
                size_t stack_len = MPLS_HLEN;
 
-               /* In the presence of an MPLS label stack the end of the L2
-                * header and the beginning of the L3 header differ.
-                *
-                * Advance network_header to the beginning of the L3
-                * header. mac_len corresponds to the end of the L2 header.
-                */
+               skb_set_inner_network_header(skb, skb->mac_len);
                while (1) {
                        __be32 lse;
 
@@ -646,12 +641,12 @@ static int key_extract(struct sk_buff *skb, struct sw_flow_key *key)
                        if (unlikely(error))
                                return 0;
 
-                       memcpy(&lse, skb_network_header(skb), MPLS_HLEN);
+                       memcpy(&lse, skb_inner_network_header(skb), MPLS_HLEN);
 
                        if (stack_len == MPLS_HLEN)
                                memcpy(&key->mpls.top_lse, &lse, MPLS_HLEN);
 
-                       skb_set_network_header(skb, skb->mac_len + stack_len);
+                       skb_set_inner_network_header(skb, skb->mac_len + stack_len);
                        if (lse & htonl(MPLS_LS_S_MASK))
                                break;