Skip to content

Commit 53631a5

Browse files
hlrichardsondavem330
authored andcommitted
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 <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 580bdf5 commit 53631a5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/uapi/linux/igmp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct igmpv3_grec {
5353
struct igmpv3_report {
5454
__u8 type;
5555
__u8 resv1;
56-
__be16 csum;
56+
__sum16 csum;
5757
__be16 resv2;
5858
__be16 ngrec;
5959
struct igmpv3_grec grec[0];
@@ -62,7 +62,7 @@ struct igmpv3_report {
6262
struct igmpv3_query {
6363
__u8 type;
6464
__u8 code;
65-
__be16 csum;
65+
__sum16 csum;
6666
__be32 group;
6767
#if defined(__LITTLE_ENDIAN_BITFIELD)
6868
__u8 qrv:3,

net/bridge/br_multicast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br,
540540
break;
541541
case 2:
542542
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));
544544
mld2q->mld2q_type = ICMPV6_MGM_QUERY;
545545
mld2q->mld2q_code = 0;
546546
mld2q->mld2q_cksum = 0;

0 commit comments

Comments
 (0)