]> git.hungrycats.org Git - linux/commitdiff
[IPV6] ensure to evaluate the checksum for sockets with the IPV6_CHECKSUM option.
authorHideaki Yoshifuji <yoshfuji@linux-ipv6.org>
Fri, 21 May 2004 03:41:07 +0000 (12:41 +0900)
committerHideaki Yoshifuji <yoshfuji@linux-ipv6.org>
Fri, 21 May 2004 03:41:07 +0000 (12:41 +0900)
net/ipv6/raw.c

index 24b72752a41f556cd53ba34976b0b819386d7bd3..875684b5138a2033391e63ee7759c6b80c88633c 100644 (file)
@@ -283,7 +283,8 @@ void rawv6_err(struct sock *sk, struct sk_buff *skb,
 
 static inline int rawv6_rcv_skb(struct sock * sk, struct sk_buff * skb)
 {
-       if (sk->sk_filter && skb->ip_summed != CHECKSUM_UNNECESSARY) {
+       if ((raw6_sk(sk)->checksum || sk->sk_filter) && 
+           skb->ip_summed != CHECKSUM_UNNECESSARY) {
                if ((unsigned short)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum))) {
                        /* FIXME: increment a raw6 drops counter here */
                        kfree_skb(skb);