diff options
| author | Martin Varghese <[email protected]> | 2019-12-05 00:27:22 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2019-12-05 01:11:25 +0000 |
| commit | d04ac224b1688f005a84f764cfe29844f8e9da08 (patch) | |
| tree | 5cfc5f7aa731b446d53c6f429409c9a2c98c0145 /net/openvswitch/actions.c | |
| parent | NFC: NCI: use new `delay` structure for SPI transfer delays (diff) | |
| download | kernel-d04ac224b1688f005a84f764cfe29844f8e9da08.tar.gz kernel-d04ac224b1688f005a84f764cfe29844f8e9da08.zip | |
net: Fixed updating of ethertype in skb_mpls_push()
The skb_mpls_push was not updating ethertype of an ethernet packet if
the packet was originally received from a non ARPHRD_ETHER device.
In the below OVS data path flow, since the device corresponding to
port 7 is an l3 device (ARPHRD_NONE) the skb_mpls_push function does
not update the ethertype of the packet even though the previous
push_eth action had added an ethernet header to the packet.
recirc_id(0),in_port(7),eth_type(0x0800),ipv4(tos=0/0xfc,ttl=64,frag=no),
actions:push_eth(src=00:00:00:00:00:00,dst=00:00:00:00:00:00),
push_mpls(label=13,tc=0,ttl=64,bos=1,eth_type=0x8847),4
Fixes: 8822e270d697 ("net: core: move push MPLS functionality from OvS to core helper")
Signed-off-by: Martin Varghese <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/openvswitch/actions.c')
| -rw-r--r-- | net/openvswitch/actions.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 91e210061bb3..4c8395462303 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -166,7 +166,8 @@ static int push_mpls(struct sk_buff *skb, struct sw_flow_key *key, int err; err = skb_mpls_push(skb, mpls->mpls_lse, mpls->mpls_ethertype, - skb->mac_len); + skb->mac_len, + ovs_key_mac_proto(key) == MAC_PROTO_ETHERNET); if (err) return err; |
