Commit 53631a5f authored by Lance Richardson's avatar Lance Richardson Committed by David S. Miller

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: default avatarLance Richardson <lrichard@redhat.com>
Acked-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 580bdf56
...@@ -53,7 +53,7 @@ struct igmpv3_grec { ...@@ -53,7 +53,7 @@ struct igmpv3_grec {
struct igmpv3_report { struct igmpv3_report {
__u8 type; __u8 type;
__u8 resv1; __u8 resv1;
__be16 csum; __sum16 csum;
__be16 resv2; __be16 resv2;
__be16 ngrec; __be16 ngrec;
struct igmpv3_grec grec[0]; struct igmpv3_grec grec[0];
...@@ -62,7 +62,7 @@ struct igmpv3_report { ...@@ -62,7 +62,7 @@ struct igmpv3_report {
struct igmpv3_query { struct igmpv3_query {
__u8 type; __u8 type;
__u8 code; __u8 code;
__be16 csum; __sum16 csum;
__be32 group; __be32 group;
#if defined(__LITTLE_ENDIAN_BITFIELD) #if defined(__LITTLE_ENDIAN_BITFIELD)
__u8 qrv:3, __u8 qrv:3,
......
...@@ -540,7 +540,7 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br, ...@@ -540,7 +540,7 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br,
break; break;
case 2: case 2:
mld2q = (struct mld2_query *)icmp6_hdr(skb); mld2q = (struct mld2_query *)icmp6_hdr(skb);
mld2q->mld2q_mrc = ntohs((u16)jiffies_to_msecs(interval)); mld2q->mld2q_mrc = htons((u16)jiffies_to_msecs(interval));
mld2q->mld2q_type = ICMPV6_MGM_QUERY; mld2q->mld2q_type = ICMPV6_MGM_QUERY;
mld2q->mld2q_code = 0; mld2q->mld2q_code = 0;
mld2q->mld2q_cksum = 0; mld2q->mld2q_cksum = 0;
......
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