Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
4f89a80
)
GBP: return appropriate error code if tranport mode subnet has no interface
96/17996/2
author
Neale Ranns
<nranns@cisco.com>
Mon, 4 Mar 2019 12:21:28 +0000
(
04:21
-0800)
committer
Neale Ranns
<nranns@cisco.com>
Mon, 4 Mar 2019 13:50:11 +0000
(13:50 +0000)
Change-Id: Ic230b332a01c36454c11d0b6515ec256bd0fd5c6
Signed-off-by: Neale Ranns <nranns@cisco.com>
src/plugins/gbp/gbp_subnet.c
patch
|
blob
|
history
diff --git
a/src/plugins/gbp/gbp_subnet.c
b/src/plugins/gbp/gbp_subnet.c
index
b0b6db8
..
0c8d3ae
100644
(file)
--- a/
src/plugins/gbp/gbp_subnet.c
+++ b/
src/plugins/gbp/gbp_subnet.c
@@
-117,6
+117,9
@@
gbp_subnet_transport_add (gbp_subnet_t * gs)
fproto = gs->gs_key->gsk_pfx.fp_proto;
grd = gbp_route_domain_get (gs->gs_rd);
+ if (~0 == grd->grd_uu_sw_if_index[fproto])
+ return (VNET_API_ERROR_INVALID_SW_IF_INDEX);
+
gs->gs_fei = fib_table_entry_update_one_path (gs->gs_key->gsk_fib_index,
&gs->gs_key->gsk_pfx,
FIB_SOURCE_PLUGIN_HI,