summaryrefslogtreecommitdiffstats
path: root/src/vnet/teib/teib_cli.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-09-02 14:46:53 +0000
committerNeale Ranns <nranns@cisco.com>2020-09-17 12:55:53 +0000
commit256b67bc8873f268d2cecd16183398352b9fcd16 (patch)
treebf8cf5055de239b1b91739fc33554c93382d72d5 /src/vnet/teib/teib_cli.c
parentfc639ff2d7abd8599f59078fac99f731026215b3 (diff)
teib: Add adj-fibs for peers/adjacencies on p2mp interface
Type: fix Change-Id: I6fdc4e952097e92ac3aa53e0be3ef99e0d801b28 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/teib/teib_cli.c')
-rw-r--r--src/vnet/teib/teib_cli.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/vnet/teib/teib_cli.c b/src/vnet/teib/teib_cli.c
index faf0d828963..63e3645f14a 100644
--- a/src/vnet/teib/teib_cli.c
+++ b/src/vnet/teib/teib_cli.c
@@ -20,8 +20,8 @@ teib_add (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
{
unformat_input_t _line_input, *line_input = &_line_input;
- ip46_address_t peer = ip46_address_initializer;
ip46_address_t nh = ip46_address_initializer;
+ ip_address_t peer = IP_ADDRESS_V6_ALL_0S;
u32 sw_if_index, nh_table_id;
clib_error_t *error = NULL;
int rv;
@@ -38,7 +38,7 @@ teib_add (vlib_main_t * vm,
if (unformat (line_input, "%U", unformat_vnet_sw_interface,
vnet_get_main (), &sw_if_index))
;
- else if (unformat (line_input, "peer %U", unformat_ip46_address, &peer))
+ else if (unformat (line_input, "peer %U", unformat_ip_address, &peer))
;
else if (unformat (line_input, "nh %U", unformat_ip46_address, &nh))
;
@@ -58,7 +58,7 @@ teib_add (vlib_main_t * vm,
format_unformat_error, line_input);
goto done;
}
- if (ip46_address_is_zero (&peer))
+ if (ip_address_is_zero (&peer))
{
error = clib_error_return (0, "peer required'",
format_unformat_error, line_input);
@@ -71,7 +71,10 @@ teib_add (vlib_main_t * vm,
goto done;
}
- rv = teib_entry_add (sw_if_index, &peer, nh_table_id, &nh);
+ rv = teib_entry_add (sw_if_index,
+ ip_address_family_to_fib_proto (ip_addr_version
+ (&peer)),
+ &ip_addr_46 (&peer), nh_table_id, &nh);
if (rv)
{
@@ -99,7 +102,7 @@ teib_del (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
{
unformat_input_t _line_input, *line_input = &_line_input;
- ip46_address_t peer = ip46_address_initializer;
+ ip_address_t peer = IP_ADDRESS_V6_ALL_0S;
clib_error_t *error = NULL;
u32 sw_if_index;
int rv;
@@ -115,7 +118,7 @@ teib_del (vlib_main_t * vm,
if (unformat (line_input, "%U", unformat_vnet_sw_interface,
vnet_get_main (), &sw_if_index))
;
- else if (unformat (line_input, "peer %U", unformat_ip46_address, &peer))
+ else if (unformat (line_input, "peer %U", unformat_ip_address, &peer))
;
else
{
@@ -130,14 +133,17 @@ teib_del (vlib_main_t * vm,
error = clib_error_return (0, "interface required'",
format_unformat_error, line_input);
}
- if (ip46_address_is_zero (&peer))
+ if (ip_address_is_zero (&peer))
{
error = clib_error_return (0, "peer required'",
format_unformat_error, line_input);
goto done;
}
- rv = teib_entry_del (sw_if_index, &peer);
+ rv = teib_entry_del (sw_if_index,
+ ip_address_family_to_fib_proto (ip_addr_version
+ (&peer)),
+ &ip_addr_46 (&peer));
if (rv)
{