diff options
author | Andrew Yourtchenko <ayourtch@gmail.com> | 2022-08-23 15:38:05 +0000 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2022-08-29 21:20:58 +0000 |
commit | b46a4e69e5db18ef792415439d04a0ab22c59386 (patch) | |
tree | 160750b6edfd70c89bfa295fbcc68ec618318794 /src/vnet/ethernet/node.c | |
parent | f4f1b959c070ce462846d5666d60dc5624dd271b (diff) |
ethernet: fix coverity 218549
Check that the pointer is non-null before dereferencing it.
Type: fix
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Change-Id: I611a1042d08bbe455dd09a4fa5711fe86c440240
Diffstat (limited to 'src/vnet/ethernet/node.c')
-rw-r--r-- | src/vnet/ethernet/node.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/ethernet/node.c b/src/vnet/ethernet/node.c index 214e68809cc..21346a80658 100644 --- a/src/vnet/ethernet/node.c +++ b/src/vnet/ethernet/node.c @@ -225,7 +225,7 @@ identify_subint (ethernet_main_t * em, // A unicast packet arriving on an L3 interface must have a dmac // matching the interface mac. If interface has STATUS_L3 bit set // mac filter is already done. - if (!(*is_l2 || (ei->flags & ETHERNET_INTERFACE_FLAG_STATUS_L3))) + if (!(*is_l2 || (ei && (ei->flags & ETHERNET_INTERFACE_FLAG_STATUS_L3)))) { u64 dmacs[2]; u8 dmacs_bad[2]; |