mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 10:39:23 +01:00
netdev: Fix crash
src/netdev.c:netdev_create_from_genl() Skipping duplicate netdev wlp2s0[3] Aborting (signal 11) [/home/denkenz/iwd/src/iwd] ++++++++ backtrace ++++++++ #0 0x7fc4c7a4e930 in /lib64/libc.so.6 #1 0x40ea13 in netdev_getlink_cb() at src/netdev.c:4654 #2 0x468cab in process_message() at ell/netlink.c:183 #3 0x4690a3 in can_read_data() at ell/netlink.c:289 #4 0x46681d in io_callback() at ell/io.c:126 #5 0x4651cd in l_main_iterate() at ell/main.c:473 #6 0x46530e in l_main_run() at ell/main.c:516 #7 0x465626 in l_main_run_with_signal() at ell/main.c:642 #8 0x403df8 in main() at src/main.c:513 #9 0x7fc4c7a39bde in /lib64/libc.so.6
This commit is contained in:
parent
467b6341d8
commit
5cfc6e513d
12
src/netdev.c
12
src/netdev.c
@ -4649,10 +4649,14 @@ static void netdev_getlink_cb(int error, uint16_t type, const void *data,
|
||||
l_netlink_command_func_t cb;
|
||||
bool powered;
|
||||
|
||||
if (error != 0 || ifi->ifi_type != ARPHRD_ETHER ||
|
||||
type != RTM_NEWLINK) {
|
||||
l_error("RTM_GETLINK error %i ifi_type %i type %i",
|
||||
error, (int) ifi->ifi_type, (int) type);
|
||||
if (error != 0) {
|
||||
l_error("RTM_GETLINK error %i: %s", error, strerror(-error));
|
||||
return;
|
||||
}
|
||||
|
||||
if (ifi->ifi_type != ARPHRD_ETHER || type != RTM_NEWLINK) {
|
||||
l_debug("Non-ethernet address or not newlink message -- "
|
||||
"ifi_type: %i, type: %i", ifi->ifi_type, type);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user