]> Pileus Git - ~andy/linux/blobdiff - net/ipv4/ip_tunnel.c
iptunnel: specify protocol outside IP header
[~andy/linux] / net / ipv4 / ip_tunnel.c
index e4147ec1665a7af9c9661a12712babdf4bfd29ea..b89095c1518f50d28e58e099fb9011d0d5c260ae 100644 (file)
@@ -487,7 +487,7 @@ drop:
 EXPORT_SYMBOL_GPL(ip_tunnel_rcv);
 
 void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
-                   const struct iphdr *tnl_params)
+                   const struct iphdr *tnl_params, const u8 protocol)
 {
        struct ip_tunnel *tunnel = netdev_priv(dev);
        const struct iphdr *inner_iph;
@@ -670,7 +670,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
        iph->version    =       4;
        iph->ihl        =       sizeof(struct iphdr) >> 2;
        iph->frag_off   =       df;
-       iph->protocol   =       tnl_params->protocol;
+       iph->protocol   =       protocol;
        iph->tos        =       ip_tunnel_ecn_encap(tos, inner_iph, skb);
        iph->daddr      =       fl4.daddr;
        iph->saddr      =       fl4.saddr;