From acfaa3314dac2aef2ecc518e35ccb06f7008eed5 Mon Sep 17 00:00:00 2001 From: Hideaki Yoshifuji Date: Fri, 21 May 2004 12:41:07 +0900 Subject: [PATCH] [IPV6] ensure to evaluate the checksum for sockets with the IPV6_CHECKSUM option. --- net/ipv6/raw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 24b72752a41f5..875684b5138a2 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -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); -- 2.53.0