Skip to content

Commit

Permalink
ipv6: Need to sock_put on csum error
Browse files Browse the repository at this point in the history
Commit 4068579 ("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: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tom Herbert authored and David S. Miller committed May 6, 2014
1 parent 5a50a92 commit 79e0f1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv6/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
int ret;

if (!uh->check && !sk->sk_no_check) {
sock_put(sk);
udp6_csum_zero_error(skb);
goto csum_error;
}
Expand Down

0 comments on commit 79e0f1c

Please sign in to comment.