summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
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/ip
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/ip')
-rw-r--r--src/vnet/ip/ip6_neighbor.c10
-rw-r--r--src/vnet/ip/lookup.c41
2 files changed, 9 insertions, 42 deletions
diff --git a/src/vnet/ip/ip6_neighbor.c b/src/vnet/ip/ip6_neighbor.c
index 82b402ff263..4c1b1bb10e6 100644
--- a/src/vnet/ip/ip6_neighbor.c
+++ b/src/vnet/ip/ip6_neighbor.c
@@ -566,8 +566,10 @@ ip6_ethernet_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 != nbr)
{
adj_nbr_walk_nh6 (sw_if_index, &nbr->key.ip6_address,
@@ -4256,6 +4258,7 @@ ethernet_ndp_change_mac (u32 sw_if_index)
{
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 @@ ethernet_ndp_change_mac (u32 sw_if_index)
}
}));
/* *INDENT-ON* */
+
+ ai = adj_glean_get (FIB_PROTOCOL_IP6, sw_if_index);
+
+ if (ADJ_INDEX_INVALID != ai)
+ adj_glean_update_rewrite (ai);
}
void
diff --git a/src/vnet/ip/lookup.c b/src/vnet/ip/lookup.c
index f2880bf8cd9..256000a2242 100644
--- a/src/vnet/ip/lookup.c
+++ b/src/vnet/ip/lookup.c
@@ -255,47 +255,6 @@ format_ip_flow_hash_config (u8 * s, va_list * args)
}
u8 *
-format_ip_lookup_next (u8 * s, va_list * args)
-{
- /* int promotion of ip_lookup_next_t */
- ip_lookup_next_t n = va_arg (*args, int);
- char *t = 0;
-
- switch (n)
- {
- default:
- s = format (s, "unknown %d", n);
- return s;
-
- case IP_LOOKUP_NEXT_DROP:
- t = "drop";
- break;
- case IP_LOOKUP_NEXT_PUNT:
- t = "punt";
- break;
- case IP_LOOKUP_NEXT_ARP:
- t = "arp";
- break;
- case IP_LOOKUP_NEXT_MIDCHAIN:
- t = "midchain";
- break;
- case IP_LOOKUP_NEXT_GLEAN:
- t = "glean";
- break;
- case IP_LOOKUP_NEXT_MCAST:
- t = "mcast";
- break;
- case IP_LOOKUP_NEXT_REWRITE:
- break;
- }
-
- if (t)
- vec_add (s, t, strlen (t));
-
- return s;
-}
-
-u8 *
format_ip_adjacency_packet_data (u8 * s, va_list * args)
{
u32 adj_index = va_arg (*args, u32);