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/ethernet/arp.c b/src/vnet/ethernet/arp.c
index 149f0a5..4e5f867 100644
--- a/src/vnet/ethernet/arp.c
+++ b/src/vnet/ethernet/arp.c
@@ -455,8 +455,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 != e)
 	{
 	  adj_nbr_walk_nh4 (sw_if_index,
@@ -2480,6 +2482,7 @@
 {
   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 @@
     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