aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/l2')
-rw-r--r--src/vnet/l2/l2_api.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c
index 3f27feb638a..eb04459f234 100644
--- a/src/vnet/l2/l2_api.c
+++ b/src/vnet/l2/l2_api.c
@@ -688,6 +688,16 @@ static void
L2_BD_PORT_TYPE_NORMAL, 0, 0);
}
+ switch (rv)
+ {
+ case MODE_ERROR_ETH:
+ rv = VNET_API_ERROR_NON_ETHERNET;
+ break;
+ case MODE_ERROR_BVI_DEF:
+ rv = VNET_API_ERROR_BD_ALREADY_HAS_BVI;
+ break;
+ }
+
BAD_RX_SW_IF_INDEX_LABEL;
BAD_TX_SW_IF_INDEX_LABEL;
@@ -746,6 +756,16 @@ static void
rv = set_int_l2_mode (vm, vnm, MODE_L3, rx_sw_if_index, 0, pt, 0, 0);
}
+ switch (rv)
+ {
+ case MODE_ERROR_ETH:
+ rv = VNET_API_ERROR_NON_ETHERNET;
+ break;
+ case MODE_ERROR_BVI_DEF:
+ rv = VNET_API_ERROR_BD_ALREADY_HAS_BVI;
+ break;
+ }
+
BAD_RX_SW_IF_INDEX_LABEL;
BAD_BD_ID_LABEL;
out: