diff options
author | Vadim Fedorenko <vfedorenko@novek.ru> | 2020-05-20 18:21:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-22 15:49:30 -0700 |
commit | 6c11fbf97e69d2164406fc634758f90d34501ece (patch) | |
tree | a4b17f92f5244b4e9e005696f61a78cfd622aadd /net/ipv6 | |
parent | e7bb18e6c8b7ed35746af8c7c708447a66ee385c (diff) |
ip6_tunnel: add MPLS transmit support
Add ETH_P_MPLS_UC as supported protocol.
Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index dae6f7146b49..6b94c870693c 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -1232,6 +1232,8 @@ route_lookup: ipv6_push_frag_opts(skb, &opt.ops, &proto); } + skb_set_inner_ipproto(skb, proto); + skb_push(skb, sizeof(struct ipv6hdr)); skb_reset_network_header(skb); ipv6h = ipv6_hdr(skb); @@ -1348,6 +1350,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, fl6.flowlabel |= ip6_flowlabel(ipv6h); break; default: + orig_dsfield = dsfield = ip6_tclass(t->parms.flowinfo); break; } } @@ -1358,8 +1361,6 @@ ipxip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, if (iptunnel_handle_offloads(skb, SKB_GSO_IPXIP6)) return -1; - skb_set_inner_ipproto(skb, protocol); - err = ip6_tnl_xmit(skb, dev, dsfield, &fl6, encap_limit, &mtu, protocol); if (err != 0) { @@ -1402,6 +1403,9 @@ ip6_tnl_start_xmit(struct sk_buff *skb, struct net_device *dev) goto tx_err; ipproto = IPPROTO_IPV6; break; + case htons(ETH_P_MPLS_UC): + ipproto = IPPROTO_MPLS; + break; default: goto tx_err; } |