netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bridge: fix endian
@ 2012-07-10  9:56 roy.qing.li
  2012-07-10 10:04 ` devendra.aaru
  2012-07-11  8:32 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: roy.qing.li @ 2012-07-10  9:56 UTC (permalink / raw)
  To: netdev; +Cc: yoshfuji

From: Li RongQing <roy.qing.li@gmail.com>

mld->mld_maxdelay is net endian, so we should use ntohs, not htons

CC: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
 net/bridge/br_multicast.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index b665812..2d9a066 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1160,7 +1160,7 @@ static int br_ip6_multicast_query(struct net_bridge *br,
 			goto out;
 		}
 		mld = (struct mld_msg *) icmp6_hdr(skb);
-		max_delay = msecs_to_jiffies(htons(mld->mld_maxdelay));
+		max_delay = msecs_to_jiffies(ntohs(mld->mld_maxdelay));
 		if (max_delay)
 			group = &mld->mld_mca;
 	} else if (skb->len >= sizeof(*mld2q)) {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] bridge: fix endian
  2012-07-10  9:56 [PATCH] bridge: fix endian roy.qing.li
@ 2012-07-10 10:04 ` devendra.aaru
  2012-07-10 14:00   ` RongQing Li
  2012-07-11  8:32 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: devendra.aaru @ 2012-07-10 10:04 UTC (permalink / raw)
  To: roy.qing.li; +Cc: netdev, yoshfuji

As you are doing the same change to the drivers in drivers/net/*** i
think a patchset would be better.

but that's just upto you. ;-)

Thanks,

On Tue, Jul 10, 2012 at 3:26 PM,  <roy.qing.li@gmail.com> wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
>
> mld->mld_maxdelay is net endian, so we should use ntohs, not htons
>
> CC: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
> ---
>  net/bridge/br_multicast.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
> index b665812..2d9a066 100644
> --- a/net/bridge/br_multicast.c
> +++ b/net/bridge/br_multicast.c
> @@ -1160,7 +1160,7 @@ static int br_ip6_multicast_query(struct net_bridge *br,
>                         goto out;
>                 }
>                 mld = (struct mld_msg *) icmp6_hdr(skb);
> -               max_delay = msecs_to_jiffies(htons(mld->mld_maxdelay));
> +               max_delay = msecs_to_jiffies(ntohs(mld->mld_maxdelay));
>                 if (max_delay)
>                         group = &mld->mld_mca;
>         } else if (skb->len >= sizeof(*mld2q)) {
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bridge: fix endian
  2012-07-10 10:04 ` devendra.aaru
@ 2012-07-10 14:00   ` RongQing Li
  0 siblings, 0 replies; 4+ messages in thread
From: RongQing Li @ 2012-07-10 14:00 UTC (permalink / raw)
  To: devendra.aaru; +Cc: netdev, yoshfuji

2012/7/10, devendra.aaru <devendra.aaru@gmail.com>:
> As you are doing the same change to the drivers in drivers/net/*** i
> think a patchset would be better.
>
> but that's just upto you. ;-)
>
> Thanks,

If I can find others afterward, I will change them on a patchset.
Thanks

-Roy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] bridge: fix endian
  2012-07-10  9:56 [PATCH] bridge: fix endian roy.qing.li
  2012-07-10 10:04 ` devendra.aaru
@ 2012-07-11  8:32 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2012-07-11  8:32 UTC (permalink / raw)
  To: roy.qing.li; +Cc: netdev, yoshfuji

From: roy.qing.li@gmail.com
Date: Tue, 10 Jul 2012 17:56:12 +0800

> From: Li RongQing <roy.qing.li@gmail.com>
> 
> mld->mld_maxdelay is net endian, so we should use ntohs, not htons
> 
> CC: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-11  8:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-10  9:56 [PATCH] bridge: fix endian roy.qing.li
2012-07-10 10:04 ` devendra.aaru
2012-07-10 14:00   ` RongQing Li
2012-07-11  8:32 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).