aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/openvswitch/flow.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index 634cc10d6dee..c8c82e109c68 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -633,12 +633,7 @@ static int key_extract(struct sk_buff *skb, struct sw_flow_key *key)
633 } else if (eth_p_mpls(key->eth.type)) { 633 } else if (eth_p_mpls(key->eth.type)) {
634 size_t stack_len = MPLS_HLEN; 634 size_t stack_len = MPLS_HLEN;
635 635
636 /* In the presence of an MPLS label stack the end of the L2 636 skb_set_inner_network_header(skb, skb->mac_len);
637 * header and the beginning of the L3 header differ.
638 *
639 * Advance network_header to the beginning of the L3
640 * header. mac_len corresponds to the end of the L2 header.
641 */
642 while (1) { 637 while (1) {
643 __be32 lse; 638 __be32 lse;
644 639
@@ -646,12 +641,12 @@ static int key_extract(struct sk_buff *skb, struct sw_flow_key *key)
646 if (unlikely(error)) 641 if (unlikely(error))
647 return 0; 642 return 0;
648 643
649 memcpy(&lse, skb_network_header(skb), MPLS_HLEN); 644 memcpy(&lse, skb_inner_network_header(skb), MPLS_HLEN);
650 645
651 if (stack_len == MPLS_HLEN) 646 if (stack_len == MPLS_HLEN)
652 memcpy(&key->mpls.top_lse, &lse, MPLS_HLEN); 647 memcpy(&key->mpls.top_lse, &lse, MPLS_HLEN);
653 648
654 skb_set_network_header(skb, skb->mac_len + stack_len); 649 skb_set_inner_network_header(skb, skb->mac_len + stack_len);
655 if (lse & htonl(MPLS_LS_S_MASK)) 650 if (lse & htonl(MPLS_LS_S_MASK))
656 break; 651 break;
657 652