aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-03-04 04:21:28 -0800
committerNeale Ranns <nranns@cisco.com>2019-03-04 13:50:11 +0000
commit7693ca524990d3779a44ec36820fe9c0c19eeb92 (patch)
treeba6e2f603b0035114dfe7f6892def347be4dde93
parent4f89a804d560a9c73dd9b74ce48793c969ea163a (diff)
GBP: return appropriate error code if tranport mode subnet has no interface
Change-Id: Ic230b332a01c36454c11d0b6515ec256bd0fd5c6 Signed-off-by: Neale Ranns <nranns@cisco.com>
-rw-r--r--src/plugins/gbp/gbp_subnet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/gbp/gbp_subnet.c b/src/plugins/gbp/gbp_subnet.c
index b0b6db8040e..0c8d3aee0a7 100644
--- 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,