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>
diff --git a/src/vnet/ip/ip6_neighbor.c b/src/vnet/ip/ip6_neighbor.c
index 82b402f..4c1b1bb 100644
--- a/src/vnet/ip/ip6_neighbor.c
+++ b/src/vnet/ip/ip6_neighbor.c
@@ -566,8 +566,10 @@
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 != nbr)
{
adj_nbr_walk_nh6 (sw_if_index, &nbr->key.ip6_address,
@@ -4256,6 +4258,7 @@
{
ip6_neighbor_main_t *nm = &ip6_neighbor_main;
ip6_neighbor_t *n;
+ adj_index_t ai;
/* *INDENT-OFF* */
pool_foreach (n, nm->neighbor_pool,
@@ -4268,6 +4271,11 @@
}
}));
/* *INDENT-ON* */
+
+ ai = adj_glean_get (FIB_PROTOCOL_IP6, sw_if_index);
+
+ if (ADJ_INDEX_INVALID != ai)
+ adj_glean_update_rewrite (ai);
}
void