summaryrefslogtreecommitdiffstats
path: root/src/vnet/adj
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-12-29 23:55:18 +0000
committerDamjan Marion <dmarion@me.com>2020-01-27 20:40:30 +0000
commit14053c9dbd75182f5302f7388d17508f3930f7ce (patch)
tree527f7675cfe18b13cc7c1923cd7959ec80459a7c /src/vnet/adj
parent59ff918ea5b86112ffc89054aa38107703354585 (diff)
ipip: Multi-point interface
Type: feature plus fixes for gre Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I0eca5f94b8b8ea0fcfb058162cafea4491708db6
Diffstat (limited to 'src/vnet/adj')
-rw-r--r--src/vnet/adj/adj.c2
-rw-r--r--src/vnet/adj/adj_delegate.c4
-rw-r--r--src/vnet/adj/adj_midchain.c11
-rw-r--r--src/vnet/adj/adj_nbr.c34
4 files changed, 33 insertions, 18 deletions
diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c
index a603925e905..c758ebeae3a 100644
--- a/src/vnet/adj/adj.c
+++ b/src/vnet/adj/adj.c
@@ -182,7 +182,7 @@ format_ip_adjacency (u8 * s, va_list * args)
s = format (s, "\n flags:%U", format_adj_flags, adj->ia_flags);
s = format (s, "\n counts:[%Ld:%Ld]", counts.packets, counts.bytes);
s = format (s, "\n locks:%d", adj->ia_node.fn_locks);
- s = format(s, "\n delegates:\n ");
+ s = format(s, "\n delegates:");
s = adj_delegate_format(s, adj);
s = format(s, "\n children:");
diff --git a/src/vnet/adj/adj_delegate.c b/src/vnet/adj/adj_delegate.c
index 68232c5810a..87a83fb4239 100644
--- a/src/vnet/adj/adj_delegate.c
+++ b/src/vnet/adj/adj_delegate.c
@@ -163,13 +163,13 @@ adj_delegate_format (u8* s, ip_adjacency_t *adj)
{
if (ad_vfts[aed->ad_type].adv_format)
{
- s = format(s, "{");
+ s = format(s, "\n {");
s = ad_vfts[aed->ad_type].adv_format(aed, s);
s = format(s, "}");
}
else
{
- s = format(s, "{unknown delegate}");
+ s = format(s, "\n {unknown delegate}");
}
}
diff --git a/src/vnet/adj/adj_midchain.c b/src/vnet/adj/adj_midchain.c
index 542b5a13250..33da0ed829e 100644
--- a/src/vnet/adj/adj_midchain.c
+++ b/src/vnet/adj/adj_midchain.c
@@ -513,12 +513,11 @@ adj_nbr_midchain_update_rewrite (adj_index_t adj_index,
* one time only update. since we don't support changing the tunnel
* src,dst, this is all we need.
*/
- ASSERT((adj->lookup_next_index == IP_LOOKUP_NEXT_ARP) ||
- (adj->lookup_next_index == IP_LOOKUP_NEXT_GLEAN) ||
- (adj->lookup_next_index == IP_LOOKUP_NEXT_MCAST) ||
- (adj->lookup_next_index == IP_LOOKUP_NEXT_BCAST));
-
- adj_midchain_setup(adj_index, fixup, fixup_data, flags);
+ if (adj->lookup_next_index != IP_LOOKUP_NEXT_MIDCHAIN ||
+ adj->lookup_next_index != IP_LOOKUP_NEXT_MCAST_MIDCHAIN)
+ {
+ adj_midchain_setup(adj_index, fixup, fixup_data, flags);
+ }
/*
* update the rewrite with the workers paused.
diff --git a/src/vnet/adj/adj_nbr.c b/src/vnet/adj/adj_nbr.c
index 9e990e00f3b..75313267ea1 100644
--- a/src/vnet/adj/adj_nbr.c
+++ b/src/vnet/adj/adj_nbr.c
@@ -907,15 +907,19 @@ adj_nbr_show (vlib_main_t * vm,
vlib_cli_command_t * cmd)
{
adj_index_t ai = ADJ_INDEX_INVALID;
+ ip46_address_t nh = ip46_address_initializer;
u32 sw_if_index = ~0;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
- if (unformat (input, "%d", &ai))
+ if (unformat (input, "%U",
+ unformat_vnet_sw_interface, vnet_get_main(),
+ &sw_if_index))
;
else if (unformat (input, "%U",
- unformat_vnet_sw_interface, vnet_get_main(),
- &sw_if_index))
+ unformat_ip46_address, &nh, IP46_TYPE_ANY))
+ ;
+ else if (unformat (input, "%d", &ai))
;
else
break;
@@ -932,12 +936,24 @@ adj_nbr_show (vlib_main_t * vm,
{
fib_protocol_t proto;
- for (proto = FIB_PROTOCOL_IP4; proto <= FIB_PROTOCOL_IP6; proto++)
- {
- adj_nbr_walk(sw_if_index, proto,
- adj_nbr_show_one,
- vm);
- }
+ if (ip46_address_is_zero(&nh))
+ {
+ for (proto = FIB_PROTOCOL_IP4; proto <= FIB_PROTOCOL_IP6; proto++)
+ {
+ adj_nbr_walk(sw_if_index, proto,
+ adj_nbr_show_one,
+ vm);
+ }
+ }
+ else
+ {
+ proto = (ip46_address_is_ip4(&nh) ?
+ FIB_PROTOCOL_IP4 :
+ FIB_PROTOCOL_IP6);
+ adj_nbr_walk_nh(sw_if_index, proto, &nh,
+ adj_nbr_show_one,
+ vm);
+ }
}
else
{