Skip to content

Commit

Permalink
[IPSEC]: Fix pure tunnel modes involving IPv6
Browse files Browse the repository at this point in the history
I noticed that my recent patch broke 6-on-4 pure IPsec tunnels (the ones
that are only used for incompressible IPsec packets).  Subsequent reviews
show that I broke 6-on-6 pure tunnels more than three years ago and nobody
ever noticed. I suppose every must be testing 6-on-6 IPComp with large
pings which are very compressible :)

This patch fixes both cases.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Oct 18, 2007
1 parent aaf70ec commit 04663d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/ipv4/xfrm4_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static int ipip_output(struct xfrm_state *x, struct sk_buff *skb)

static int ipip_xfrm_rcv(struct xfrm_state *x, struct sk_buff *skb)
{
return IPPROTO_IP;
return ip_hdr(skb)->protocol;
}

static int ipip_init_state(struct xfrm_state *x)
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/xfrm6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static int xfrm6_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)

static int xfrm6_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
{
return 0;
return skb_network_header(skb)[IP6CB(skb)->nhoff];
}

static int xfrm6_tunnel_rcv(struct sk_buff *skb)
Expand Down

0 comments on commit 04663d0

Please sign in to comment.