提交 79e0f1c9 编写于 作者: T Tom Herbert 提交者: David S. Miller

ipv6: Need to sock_put on csum error

Commit 4068579e ("net: Implmement
RFC 6936 (zero RX csums for UDP/IPv6)") introduced zero checksums
being allowed for IPv6, but in the case that a socket disallows a
zero checksum on RX we need to sock_put.
Signed-off-by: NTom Herbert <therbert@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5a50a927
...@@ -884,6 +884,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable, ...@@ -884,6 +884,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
int ret; int ret;
if (!uh->check && !sk->sk_no_check) { if (!uh->check && !sk->sk_no_check) {
sock_put(sk);
udp6_csum_zero_error(skb); udp6_csum_zero_error(skb);
goto csum_error; goto csum_error;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册