diff options
author | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2021-10-26 16:11:38 +0200 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2021-10-29 10:15:42 +0000 |
commit | b225b0a2af66b0a3a007d50877638f7489acbaf3 (patch) | |
tree | 85cc533201a42214a6c5cc5dd1d52478524d231c /src/vnet/devices/af_packet/af_packet.c | |
parent | 8f3415dee376d53371b92293d8d10833ea53ca77 (diff) |
devices: default mode eth in the api
Type: fix
https://gerrit.fd.io/r/c/vpp/+/34027 added support
for l3 mode, but as the eth_mode constant was set
to 1 we did default to l3 mode in the api.
This reverts to the original logic.
Change-Id: If8b90b300d3868de5233dfa1f33ec975853cba11
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/vnet/devices/af_packet/af_packet.c')
-rw-r--r-- | src/vnet/devices/af_packet/af_packet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/devices/af_packet/af_packet.c b/src/vnet/devices/af_packet/af_packet.c index 69e3c871412..0508d3ec963 100644 --- a/src/vnet/devices/af_packet/af_packet.c +++ b/src/vnet/devices/af_packet/af_packet.c @@ -381,7 +381,7 @@ af_packet_create_if (af_packet_create_if_arg_t *arg) if (tm->n_vlib_mains > 1) clib_spinlock_init (&apif->lockp); - if (apif->mode == AF_PACKET_IF_MODE_ETHERNET) + if (apif->mode != AF_PACKET_IF_MODE_IP) { /*use configured or generate random MAC address */ if (arg->hw_addr) @@ -518,7 +518,7 @@ af_packet_delete_if (u8 *host_if_name) mhash_unset (&apm->if_index_by_host_if_name, host_if_name, &if_index); - if (apif->mode == AF_PACKET_IF_MODE_ETHERNET) + if (apif->mode != AF_PACKET_IF_MODE_IP) ethernet_delete_interface (vnm, apif->hw_if_index); else vnet_delete_hw_interface (vnm, apif->hw_if_index); |