提交 9d9f163c 编写于 作者: M Mike Rapoport 提交者: David S. Miller

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: NMike Rapoport <mike.rapoport@ravellosystems.com>
Acked-by: NCong Wang <xiyou.wangcong@gmail.com>
Acked-by: NStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c84d8055
......@@ -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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册