diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2016-06-12 12:02:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-10 10:26:15 +0200 |
commit | 895db6cc3c473b1d5d58aabd2462b2c86c756247 (patch) | |
tree | c2324d91d80775f94aef4fefe1acd4199e68aed9 /net/ipv4/udp.c | |
parent | 8345fec4b01e0e014f8f7cc3ed37634d6bf9f308 (diff) |
ipv4: fix checksum annotation in udp4_csum_init
commit b46d9f625b07f843c706c2c7d0210a90ccdf143b upstream.
Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Tom Herbert <tom@herbertland.com>
Fixes: 4068579e1e098fa ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 0924f93a0aff..903998cb4248 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1754,8 +1754,11 @@ static inline int udp4_csum_init(struct sk_buff *skb, struct udphdr *uh, } } - return skb_checksum_init_zero_check(skb, proto, uh->check, - inet_compute_pseudo); + /* 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); } /* |