diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2008-04-02 00:06:09 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-02 00:06:09 -0700 |
commit | f32c5f2c3866bf4d932d2bc42216dafb90a50ab7 (patch) | |
tree | fd2d7da5651b76027977dc35af353a45ca348a45 /net | |
parent | a22eb6faae4ec64d59cc206671eb0bfe46c5ffd2 (diff) | |
download | linux-f32c5f2c3866bf4d932d2bc42216dafb90a50ab7.tar.gz linux-f32c5f2c3866bf4d932d2bc42216dafb90a50ab7.tar.bz2 linux-f32c5f2c3866bf4d932d2bc42216dafb90a50ab7.zip |
[IPV6]: Fix ICMP relookup error path dst leak
When we encounter an error while looking up the dst the second
time we need to drop the first dst. This patch is pretty much
the same as the one for IPv4.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/icmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 121d517bf91c..f204a7275a0d 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -436,10 +436,10 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, } if (xfrm_decode_session_reverse(skb, &fl2, AF_INET6)) - goto out; + goto out_dst_release; if (ip6_dst_lookup(sk, &dst2, &fl)) - goto out; + goto out_dst_release; err = xfrm_lookup(&dst2, &fl, sk, XFRM_LOOKUP_ICMP); if (err == -ENOENT) { |