Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
l2: fix null deref in l2_to_bvi()
[vpp.git]
/
src
/
vnet
/
l2
/
l2_bvi.h
diff --git
a/src/vnet/l2/l2_bvi.h
b/src/vnet/l2/l2_bvi.h
index
300ea81
..
697e25b
100644
(file)
--- a/
src/vnet/l2/l2_bvi.h
+++ b/
src/vnet/l2/l2_bvi.h
@@
-72,7
+72,7
@@
l2_to_bvi (vlib_main_t * vlib_main,
ethernet_interface_t *ei = ethernet_get_interface (em, hi->hw_if_index);
u32 rv;
ethernet_interface_t *ei = ethernet_get_interface (em, hi->hw_if_index);
u32 rv;
- if (PREDICT_FALSE (
vec_len (ei->secondary_addrs) > 0
))
+ if (PREDICT_FALSE (
ei && (vec_len (ei->secondary_addrs) > 0)
))
rv = l2_to_bvi_dmac_check (hi, e0->dst_address, ei,
1 /* have_sec_dmac */ );
else
rv = l2_to_bvi_dmac_check (hi, e0->dst_address, ei,
1 /* have_sec_dmac */ );
else