diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2013-05-27 19:48:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-31 20:19:05 -0400 |
commit | bf3d6a8f791b2a81279b9ce3201b4970f6fbe51a (patch) | |
tree | 72093c081b2de664ca77da0bc56fcaebf19eb195 /net/ipv4/ip_tunnel.c | |
parent | 35d0461061f27eeb62de63174959edbbb9e434de (diff) |
iptunnel: specify protocol outside IP header
Before this patch, ip_tunnel_xmit() was using the field protocol from the IP
header passed into argument.
There is no functional change, this patch prepares the support of IPv4 over
IPv4 for module sit.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_tunnel.c')
-rw-r--r-- | net/ipv4/ip_tunnel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index e4147ec1665a..b89095c1518f 100644 --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c | |||
@@ -487,7 +487,7 @@ drop: | |||
487 | EXPORT_SYMBOL_GPL(ip_tunnel_rcv); | 487 | EXPORT_SYMBOL_GPL(ip_tunnel_rcv); |
488 | 488 | ||
489 | void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, | 489 | void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, |
490 | const struct iphdr *tnl_params) | 490 | const struct iphdr *tnl_params, const u8 protocol) |
491 | { | 491 | { |
492 | struct ip_tunnel *tunnel = netdev_priv(dev); | 492 | struct ip_tunnel *tunnel = netdev_priv(dev); |
493 | const struct iphdr *inner_iph; | 493 | const struct iphdr *inner_iph; |
@@ -670,7 +670,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, | |||
670 | iph->version = 4; | 670 | iph->version = 4; |
671 | iph->ihl = sizeof(struct iphdr) >> 2; | 671 | iph->ihl = sizeof(struct iphdr) >> 2; |
672 | iph->frag_off = df; | 672 | iph->frag_off = df; |
673 | iph->protocol = tnl_params->protocol; | 673 | iph->protocol = protocol; |
674 | iph->tos = ip_tunnel_ecn_encap(tos, inner_iph, skb); | 674 | iph->tos = ip_tunnel_ecn_encap(tos, inner_iph, skb); |
675 | iph->daddr = fl4.daddr; | 675 | iph->daddr = fl4.daddr; |
676 | iph->saddr = fl4.saddr; | 676 | iph->saddr = fl4.saddr; |