diff options
author | David S. Miller <davem@davemloft.net> | 2010-07-03 07:04:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-03 07:04:49 +0200 |
commit | 94e6721d9ce938293a02736c5f7e42205a41ea68 (patch) | |
tree | 84717f7b9ed8132db312be443126704923bff288 /net/ipv6 | |
parent | linux/net.h: fix kernel-doc warnings (diff) | |
parent | netfilter: ip6t_REJECT: fix a dst leak in ipv6 REJECT (diff) | |
download | linux-94e6721d9ce938293a02736c5f7e42205a41ea68.tar.xz linux-94e6721d9ce938293a02736c5f7e42205a41ea68.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/ip6t_REJECT.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c index 47d227713758..2933396e0281 100644 --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c @@ -97,9 +97,11 @@ static void send_reset(struct net *net, struct sk_buff *oldskb) fl.fl_ip_dport = otcph.source; security_skb_classify_flow(oldskb, &fl); dst = ip6_route_output(net, NULL, &fl); - if (dst == NULL) + if (dst == NULL || dst->error) { + dst_release(dst); return; - if (dst->error || xfrm_lookup(net, &dst, &fl, NULL, 0)) + } + if (xfrm_lookup(net, &dst, &fl, NULL, 0)) return; hh_len = (dst->dev->hard_header_len + 15)&~15; |