aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2018-02-16 02:44:05 -0800
committerNeale Ranns <neale.ranns@cisco.com>2018-02-16 02:44:08 -0800
commitc819fc612f9a79eaba2981dc2e8f7c31552db5ea (patch)
treeba19a3f7b2f223ebd28e3fe87ad5f73ef81d9745 /src/vnet/ethernet
parent25d417f28680c78a709792d997884dd80227bb70 (diff)
Allow providers to override glean behaviour
and update glean address on local interface MAC change Change-Id: I530826d60c7e9db2b0fa2d45754139d82c5ea807 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/ethernet')
-rw-r--r--src/vnet/ethernet/arp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vnet/ethernet/arp.c b/src/vnet/ethernet/arp.c
index 149f0a5dc96..4e5f867e8b1 100644
--- a/src/vnet/ethernet/arp.c
+++ b/src/vnet/ethernet/arp.c
@@ -455,8 +455,10 @@ arp_update_adjacency (vnet_main_t * vnm, u32 sw_if_index, u32 ai)
switch (adj->lookup_next_index)
{
- case IP_LOOKUP_NEXT_ARP:
case IP_LOOKUP_NEXT_GLEAN:
+ adj_glean_update_rewrite (ai);
+ break;
+ case IP_LOOKUP_NEXT_ARP:
if (NULL != e)
{
adj_nbr_walk_nh4 (sw_if_index,
@@ -2480,6 +2482,7 @@ ethernet_arp_change_mac (u32 sw_if_index)
{
ethernet_arp_main_t *am = &ethernet_arp_main;
ethernet_arp_ip4_entry_t *e;
+ adj_index_t ai;
/* *INDENT-OFF* */
pool_foreach (e, am->ip4_entry_pool,
@@ -2487,6 +2490,11 @@ ethernet_arp_change_mac (u32 sw_if_index)
change_arp_mac (sw_if_index, e);
}));
/* *INDENT-ON* */
+
+ ai = adj_glean_get (FIB_PROTOCOL_IP4, sw_if_index);
+
+ if (ADJ_INDEX_INVALID != ai)
+ adj_glean_update_rewrite (ai);
}
void