Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bridge: sparse fixes in br_ip6_multicast_alloc_query()

Changed type of csum field in struct igmpv3_query from __be16 to
__sum16 to eliminate type warning, made same change in struct
igmpv3_report for consistency.

Fixed up an ntohs() where htons() should have been used instead.

Signed-off-by: Lance Richardson <lrichard@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Lance Richardson and committed by
David S. Miller
53631a5f 580bdf56

+3 -3
+2 -2
include/uapi/linux/igmp.h
··· 53 53 struct igmpv3_report { 54 54 __u8 type; 55 55 __u8 resv1; 56 - __be16 csum; 56 + __sum16 csum; 57 57 __be16 resv2; 58 58 __be16 ngrec; 59 59 struct igmpv3_grec grec[0]; ··· 62 62 struct igmpv3_query { 63 63 __u8 type; 64 64 __u8 code; 65 - __be16 csum; 65 + __sum16 csum; 66 66 __be32 group; 67 67 #if defined(__LITTLE_ENDIAN_BITFIELD) 68 68 __u8 qrv:3,
+1 -1
net/bridge/br_multicast.c
··· 540 540 break; 541 541 case 2: 542 542 mld2q = (struct mld2_query *)icmp6_hdr(skb); 543 - mld2q->mld2q_mrc = ntohs((u16)jiffies_to_msecs(interval)); 543 + mld2q->mld2q_mrc = htons((u16)jiffies_to_msecs(interval)); 544 544 mld2q->mld2q_type = ICMPV6_MGM_QUERY; 545 545 mld2q->mld2q_code = 0; 546 546 mld2q->mld2q_cksum = 0;