diff options
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 80d359c6310b..5ed64d496f83 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c | |||
@@ -340,7 +340,7 @@ static inline struct hlist_head *vxlan_fdb_head(struct vxlan_dev *vxlan, | |||
340 | } | 340 | } |
341 | 341 | ||
342 | /* Look up Ethernet address in forwarding table */ | 342 | /* Look up Ethernet address in forwarding table */ |
343 | static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan, | 343 | static struct vxlan_fdb *__vxlan_find_mac(struct vxlan_dev *vxlan, |
344 | const u8 *mac) | 344 | const u8 *mac) |
345 | 345 | ||
346 | { | 346 | { |
@@ -355,6 +355,18 @@ static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan, | |||
355 | return NULL; | 355 | return NULL; |
356 | } | 356 | } |
357 | 357 | ||
358 | static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan, | ||
359 | const u8 *mac) | ||
360 | { | ||
361 | struct vxlan_fdb *f; | ||
362 | |||
363 | f = __vxlan_find_mac(vxlan, mac); | ||
364 | if (f) | ||
365 | f->used = jiffies; | ||
366 | |||
367 | return f; | ||
368 | } | ||
369 | |||
358 | /* Add/update destinations for multicast */ | 370 | /* Add/update destinations for multicast */ |
359 | static int vxlan_fdb_append(struct vxlan_fdb *f, | 371 | static int vxlan_fdb_append(struct vxlan_fdb *f, |
360 | __be32 ip, __be16 port, __u32 vni, __u32 ifindex) | 372 | __be32 ip, __be16 port, __u32 vni, __u32 ifindex) |
@@ -392,7 +404,7 @@ static int vxlan_fdb_create(struct vxlan_dev *vxlan, | |||
392 | struct vxlan_fdb *f; | 404 | struct vxlan_fdb *f; |
393 | int notify = 0; | 405 | int notify = 0; |
394 | 406 | ||
395 | f = vxlan_find_mac(vxlan, mac); | 407 | f = __vxlan_find_mac(vxlan, mac); |
396 | if (f) { | 408 | if (f) { |
397 | if (flags & NLM_F_EXCL) { | 409 | if (flags & NLM_F_EXCL) { |
398 | netdev_dbg(vxlan->dev, | 410 | netdev_dbg(vxlan->dev, |
@@ -602,7 +614,6 @@ static void vxlan_snoop(struct net_device *dev, | |||
602 | 614 | ||
603 | f = vxlan_find_mac(vxlan, src_mac); | 615 | f = vxlan_find_mac(vxlan, src_mac); |
604 | if (likely(f)) { | 616 | if (likely(f)) { |
605 | f->used = jiffies; | ||
606 | if (likely(f->remote.remote_ip == src_ip)) | 617 | if (likely(f->remote.remote_ip == src_ip)) |
607 | return; | 618 | return; |
608 | 619 | ||