* [PATCH net-next] bridge: sparse fixes in br_ip6_multicast_alloc_query()
@ 2017-01-16 23:11 Lance Richardson
2017-01-17 16:56 ` Stephen Hemminger
2017-01-17 20:22 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Lance Richardson @ 2017-01-16 23:11 UTC (permalink / raw
To: netdev
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>
---
include/uapi/linux/igmp.h | 4 ++--
net/bridge/br_multicast.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/uapi/linux/igmp.h b/include/uapi/linux/igmp.h
index ccbb32a..a97f9a7 100644
--- a/include/uapi/linux/igmp.h
+++ b/include/uapi/linux/igmp.h
@@ -53,7 +53,7 @@ struct igmpv3_grec {
struct igmpv3_report {
__u8 type;
__u8 resv1;
- __be16 csum;
+ __sum16 csum;
__be16 resv2;
__be16 ngrec;
struct igmpv3_grec grec[0];
@@ -62,7 +62,7 @@ struct igmpv3_report {
struct igmpv3_query {
__u8 type;
__u8 code;
- __be16 csum;
+ __sum16 csum;
__be32 group;
#if defined(__LITTLE_ENDIAN_BITFIELD)
__u8 qrv:3,
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index b30e77e..f6634612 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -540,7 +540,7 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br,
break;
case 2:
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_code = 0;
mld2q->mld2q_cksum = 0;
--
2.5.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] bridge: sparse fixes in br_ip6_multicast_alloc_query()
2017-01-16 23:11 [PATCH net-next] bridge: sparse fixes in br_ip6_multicast_alloc_query() Lance Richardson
@ 2017-01-17 16:56 ` Stephen Hemminger
2017-01-17 20:22 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2017-01-17 16:56 UTC (permalink / raw
To: Lance Richardson; +Cc: netdev
On Mon, 16 Jan 2017 18:11:35 -0500
Lance Richardson <lrichard@redhat.com> wrote:
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] bridge: sparse fixes in br_ip6_multicast_alloc_query()
2017-01-16 23:11 [PATCH net-next] bridge: sparse fixes in br_ip6_multicast_alloc_query() Lance Richardson
2017-01-17 16:56 ` Stephen Hemminger
@ 2017-01-17 20:22 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-01-17 20:22 UTC (permalink / raw
To: lrichard; +Cc: netdev
From: Lance Richardson <lrichard@redhat.com>
Date: Mon, 16 Jan 2017 18:11:35 -0500
> 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>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-17 20:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-16 23:11 [PATCH net-next] bridge: sparse fixes in br_ip6_multicast_alloc_query() Lance Richardson
2017-01-17 16:56 ` Stephen Hemminger
2017-01-17 20:22 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.