act_mpls.c (040b5cfbcefa263ccf2c118c4938308606bb7ed8) | act_mpls.c (d04ac224b1688f005a84f764cfe29844f8e9da08) |
---|---|
1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2/* Copyright (C) 2019 Netronome Systems, Inc. */ 3 4#include <linux/if_arp.h> 5#include <linux/init.h> 6#include <linux/kernel.h> 7#include <linux/module.h> 8#include <linux/mpls.h> --- 69 unchanged lines hidden (view full) --- 78 switch (p->tcfm_action) { 79 case TCA_MPLS_ACT_POP: 80 if (skb_mpls_pop(skb, p->tcfm_proto, mac_len, 81 skb->dev && skb->dev->type == ARPHRD_ETHER)) 82 goto drop; 83 break; 84 case TCA_MPLS_ACT_PUSH: 85 new_lse = tcf_mpls_get_lse(NULL, p, !eth_p_mpls(skb->protocol)); | 1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2/* Copyright (C) 2019 Netronome Systems, Inc. */ 3 4#include <linux/if_arp.h> 5#include <linux/init.h> 6#include <linux/kernel.h> 7#include <linux/module.h> 8#include <linux/mpls.h> --- 69 unchanged lines hidden (view full) --- 78 switch (p->tcfm_action) { 79 case TCA_MPLS_ACT_POP: 80 if (skb_mpls_pop(skb, p->tcfm_proto, mac_len, 81 skb->dev && skb->dev->type == ARPHRD_ETHER)) 82 goto drop; 83 break; 84 case TCA_MPLS_ACT_PUSH: 85 new_lse = tcf_mpls_get_lse(NULL, p, !eth_p_mpls(skb->protocol)); |
86 if (skb_mpls_push(skb, new_lse, p->tcfm_proto, mac_len)) | 86 if (skb_mpls_push(skb, new_lse, p->tcfm_proto, mac_len, 87 skb->dev && skb->dev->type == ARPHRD_ETHER)) |
87 goto drop; 88 break; 89 case TCA_MPLS_ACT_MODIFY: 90 new_lse = tcf_mpls_get_lse(mpls_hdr(skb), p, false); 91 if (skb_mpls_update_lse(skb, new_lse)) 92 goto drop; 93 break; 94 case TCA_MPLS_ACT_DEC_TTL: --- 320 unchanged lines hidden --- | 88 goto drop; 89 break; 90 case TCA_MPLS_ACT_MODIFY: 91 new_lse = tcf_mpls_get_lse(mpls_hdr(skb), p, false); 92 if (skb_mpls_update_lse(skb, new_lse)) 93 goto drop; 94 break; 95 case TCA_MPLS_ACT_DEC_TTL: --- 320 unchanged lines hidden --- |