libxlio
libxlio copied to clipboard
libxlio crashes when no src ip configured during module load
Subject
Issue type
- [ ] Bug report
Configuration:
- Product version 3.0.2
- OS Ubuntu 22.04
- OFED
- Hardware BF2 with DOCA 2.0.2
Actual behavior:
libxlio crashes
src ip is configured after load and before connect. local array ip_arr[0] is accessed while empty (src_addr_selector.cpp:248).
stack trace:
(gdb) bt
#0 src_addr_selector::ipv4_select_saddr (flags=0 '\000', dst_addr=..., dst_dev=...) at dev/src_addr_selector.cpp:248
#1 src_addr_selector::select_ip_src_addr (dst_dev=..., dst_addr=..., flags=flags@entry=0 '\000', family=2) at dev/src_addr_selector.cpp:195
#2 0x0000ffff8815df9c in neigh_entry::neigh_entry (this=this@entry=0xaaaafe5e4010, key=..., _type=_type@entry=XLIO_TRANSPORT_ETH,
is_init_resources=is_init_resources@entry=true) at ../../src/core/util/ip_address.h:323
#3 0x0000ffff88161ce4 in neigh_eth::neigh_eth (this=0xaaaafe5e4010, key=...) at proto/neighbour.cpp:1413
#4 0x0000ffff88163bd4 in neigh_table_mgr::create_new_entry (this=
(gdb) p ip_arr $2 = std::vector of length 0, capacity 0
Expected behavior:
successful connect
Steps to reproduce:
- load the module while there is no ipv4 configured on the local (source) machine
- Configure ipv4 address on the local machine
- Try to connect