summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-11-28 04:36:37 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-11-30 09:39:12 +0000
commit8de88c03056a3cca1f5eb9dacc53bbb391a407fe (patch)
treee6a22fb52a190065553171d0fec81eeacb531186 /src/vnet
parent3e964f3bb17702f265b515b0229254bd3a7a3eef (diff)
Fix CLI path parsing for via interface only
before: DBGvpp# ip route add 1.1.1.1/32 via mpls-tunnel0 ip route add 1.1.1.1/32 via mpls-tunnel0 ip route: parse error `via mpls-tunnel0' DBGvpp# ip route add 1.1.1.1/32 via via mpls-tunnel0 ip route add 1.1.1.1/32 via via mpls-tunnel0 after: DBGvpp# ip route add 1.1.1.1/32 via via mpls-tunnel1 ip route add 1.1.1.1/32 via via mpls-tunnel1 Change-Id: I2185a82fcf0799d59de9cb16e09b7f297faffab9 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/fib/fib_types.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vnet/fib/fib_types.c b/src/vnet/fib/fib_types.c
index 5c70d6c1729..48f2bd1dc9a 100644
--- a/src/vnet/fib/fib_types.c
+++ b/src/vnet/fib/fib_types.c
@@ -417,12 +417,6 @@ unformat_fib_route_path (unformat_input_t * input, va_list * args)
rpath->frp_proto = *payload_proto;
rpath->frp_sw_if_index = ~0;
}
- else if (unformat (input, "via %U",
- unformat_vnet_sw_interface, vnm,
- &rpath->frp_sw_if_index))
- {
- rpath->frp_proto = *payload_proto;
- }
else if (unformat (input, "resolve-via-host"))
{
rpath->frp_flags |= FIB_ROUTE_PATH_RESOLVE_VIA_HOST;
@@ -483,6 +477,12 @@ unformat_fib_route_path (unformat_input_t * input, va_list * args)
vec_add1(rpath->frp_label_stack, out_label);
}
}
+ else if (unformat (input, "%U",
+ unformat_vnet_sw_interface, vnm,
+ &rpath->frp_sw_if_index))
+ {
+ rpath->frp_proto = *payload_proto;
+ }
else
{
return (0);