mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
ipv4: fix checksum annotation in udp4_csum_init
Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Tom Herbert <tom@herbertland.com>
Fixes: 4068579e1e
("net: Implmement RFC 6936 (zero RX csums for UDP/IPv6")
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c148d16369
commit
b46d9f625b
1 changed files with 5 additions and 2 deletions
|
@ -1755,7 +1755,10 @@ static inline int udp4_csum_init(struct sk_buff *skb, struct udphdr *uh,
|
|||
return err;
|
||||
}
|
||||
|
||||
return skb_checksum_init_zero_check(skb, proto, uh->check,
|
||||
/* Note, we are only interested in != 0 or == 0, thus the
|
||||
* force to int.
|
||||
*/
|
||||
return (__force int)skb_checksum_init_zero_check(skb, proto, uh->check,
|
||||
inet_compute_pseudo);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue