diff options
author | Mike Rapoport <mike.rapoport@ravellosystems.com> | 2013-04-13 19:21:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-14 15:41:49 -0400 |
commit | 9d9f163c82c678f1efe6e7d40d8691dca08c3eab (patch) | |
tree | 46a7334c4d6fdd538571fad4cf93e62ce0f4ae05 /drivers/net/vxlan.c | |
parent | c84d8055e0c9971109f426f6c551e8be644f284b (diff) |
vxlan: use htonl when snooping for loopback address
Currently "bridge fdb show dev vxlan0" lists loopback address as
"1.0.0.127". Using htonl(INADDR_LOOPBACK) rather than passing it
directly to vxlan_snoop fixes the problem.
Signed-off-by: Mike Rapoport <mike.rapoport@ravellosystems.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index ee02ecd6ae61..725aba37e182 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
@@ -925,7 +925,8 @@ static void vxlan_encap_bypass(struct sk_buff *skb, struct vxlan_dev *src_vxlan, | |||
925 | __skb_pull(skb, skb_network_offset(skb)); | 925 | __skb_pull(skb, skb_network_offset(skb)); |
926 | 926 | ||
927 | if (dst_vxlan->flags & VXLAN_F_LEARN) | 927 | if (dst_vxlan->flags & VXLAN_F_LEARN) |
928 | vxlan_snoop(skb->dev, INADDR_LOOPBACK, eth_hdr(skb)->h_source); | 928 | vxlan_snoop(skb->dev, htonl(INADDR_LOOPBACK), |
929 | eth_hdr(skb)->h_source); | ||
929 | 930 | ||
930 | u64_stats_update_begin(&tx_stats->syncp); | 931 | u64_stats_update_begin(&tx_stats->syncp); |
931 | tx_stats->tx_packets++; | 932 | tx_stats->tx_packets++; |