bridge: fix endian
authorLi RongQing <roy.qing.li@gmail.com>
Mon, 9 Jul 2012 23:56:12 +0000 (23:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jul 2012 08:31:24 +0000 (01:31 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_multicast.c

index b665812..2d9a066 100644 (file)
@@ -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)) {