提交 fd169f15 编写于 作者: D David S. Miller

[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: NDavid S. Miller <davem@davemloft.net>
上级 82709531
...@@ -995,6 +995,10 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) ...@@ -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 (sk->sk_state == DCCP_OPEN) { /* Fast path */
if (dccp_rcv_established(sk, skb, dccp_hdr(skb), skb->len)) if (dccp_rcv_established(sk, skb, dccp_hdr(skb), skb->len))
goto reset; goto reset;
if (opt_skb) {
/* This is where we would goto ipv6_pktoptions. */
__kfree_skb(opt_skb);
}
return 0; return 0;
} }
...@@ -1019,6 +1023,10 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) ...@@ -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)) if (dccp_rcv_state_process(sk, skb, dccp_hdr(skb), skb->len))
goto reset; goto reset;
if (opt_skb) {
/* This is where we would goto ipv6_pktoptions. */
__kfree_skb(opt_skb);
}
return 0; return 0;
reset: reset:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册