summaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv6.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-10-20 19:44:17 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-10-21 19:55:21 -0700
commitfd169f15a67b47f23bd1704919c719a8e8409a73 (patch)
tree31d53b4bc665e4020b147c11d7a84a7846bae09e /net/dccp/ipv6.c
parent82709531a800fcf8de71bb8c5d8e92462fb81f84 (diff)
downloadlinux-fd169f15a67b47f23bd1704919c719a8e8409a73.tar.bz2
[DCCP] ipv6: Fix opt_skb leak.
Based upon a patch from Jesper Juhl. Try to match the TCP IPv6 code this was copied from as much as possible, so that it's easy to see where to add the ipv6 pktoptions support code. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r--net/dccp/ipv6.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 91e7b12df13b..c8bf89bfb088 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -995,6 +995,10 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
if (sk->sk_state == DCCP_OPEN) { /* Fast path */
if (dccp_rcv_established(sk, skb, dccp_hdr(skb), skb->len))
goto reset;
+ if (opt_skb) {
+ /* This is where we would goto ipv6_pktoptions. */
+ __kfree_skb(opt_skb);
+ }
return 0;
}
@@ -1019,6 +1023,10 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)
if (dccp_rcv_state_process(sk, skb, dccp_hdr(skb), skb->len))
goto reset;
+ if (opt_skb) {
+ /* This is where we would goto ipv6_pktoptions. */
+ __kfree_skb(opt_skb);
+ }
return 0;
reset: