Commit acfaa331 authored by Hideaki Yoshifuji's avatar Hideaki Yoshifuji

[IPV6] ensure to evaluate the checksum for sockets with the IPV6_CHECKSUM option.

parent ec1a2191
...@@ -283,7 +283,8 @@ void rawv6_err(struct sock *sk, struct sk_buff *skb, ...@@ -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) 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))) { if ((unsigned short)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum))) {
/* FIXME: increment a raw6 drops counter here */ /* FIXME: increment a raw6 drops counter here */
kfree_skb(skb); kfree_skb(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment