sit: fix 4in4 + IPsec scenario

Since commit 32b8a8e59c "sit: add IPv4 over IPv4 support",
tunnel->parms.iph.protocol is 0 when both 4in4 and 6in4 are setup, but
xfrm_lookup() is called only when proto is != 0, thus we need to pass the real
value.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Nicolas Dichtel 2013-06-26 17:40:33 +02:00 committed by David S. Miller
parent a77471ff70
commit 963b89e80d
1 changed files with 1 additions and 1 deletions

View File

@ -542,7 +542,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
}
rt = ip_route_output_tunnel(dev_net(dev), &fl4,
tunnel->parms.iph.protocol,
protocol,
dst, tnl_params->saddr,
tunnel->parms.o_key,
RT_TOS(tos),