From 9d9f163c82c678f1efe6e7d40d8691dca08c3eab Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Sat, 13 Apr 2013 23:21:39 +0000 Subject: [PATCH] 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 Acked-by: Cong Wang Acked-by: Stephen Hemminger Signed-off-by: David S. Miller --- drivers/net/vxlan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index ee02ecd..725aba3 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, __skb_pull(skb, skb_network_offset(skb)); if (dst_vxlan->flags & VXLAN_F_LEARN) - vxlan_snoop(skb->dev, INADDR_LOOPBACK, eth_hdr(skb)->h_source); + vxlan_snoop(skb->dev, htonl(INADDR_LOOPBACK), + eth_hdr(skb)->h_source); u64_stats_update_begin(&tx_stats->syncp); tx_stats->tx_packets++; -- 2.7.4