]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
sit: Set inner IP protocol in sit
authorTom Herbert <therbert@google.com>
Tue, 30 Sep 2014 03:22:30 +0000 (20:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Oct 2014 01:35:51 +0000 (21:35 -0400)
Call skb_set_inner_ipproto to set inner IP protocol to IPPROTO_IPV6
before tunnel_xmit. This is needed if UDP encapsulation (fou) is
being done.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/sit.c

index db75809ab843e16801e1b67c0c6094a1bdea8e3c..0d4e27466f82b31667c32036e60996517b519057 100644 (file)
@@ -982,6 +982,8 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
                goto tx_error;
        }
 
+       skb_set_inner_ipproto(skb, IPPROTO_IPV6);
+
        err = iptunnel_xmit(skb->sk, rt, skb, fl4.saddr, fl4.daddr,
                            protocol, tos, ttl, df,
                            !net_eq(tunnel->net, dev_net(dev)));
@@ -1006,6 +1008,8 @@ static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
        if (IS_ERR(skb))
                goto out;
 
+       skb_set_inner_ipproto(skb, IPPROTO_IPIP);
+
        ip_tunnel_xmit(skb, dev, tiph, IPPROTO_IPIP);
        return NETDEV_TX_OK;
 out: