The following two patches are related somehow in the
scenario where wifi dongle is removed and inserted again,
and systemd-udev renames device. 
Sytemd-udev may have predefined device names, which does 
not necessarily follow kernel device sequential 
numbering. The renaming of the device causes the kernel 
to issue a new RTM_NEWLINK, but keeping same ifindex, thus 
falling in a scenario where connman is unable to handle 
currently. Observe there is no RTM_DELLINK message being 
issued in this rename action.

Patch(1/2): tried to rely on ifi_change, but I do not feel
secure to use it, as it is still stated to be set as
0xfffffff and reserved for future use, although have found
a pattern for the values filled in by rtnetlink by running and 
also taking a look at kernel code. 
(refer also to this link: 
https://lists.connman.net/pipermail/connman/2012-September/011232.html)

Patch(2/2): while preparing this patch, noticed segfault in 
scan_callback, when removing wifi dongle. Thus the second 
patch refers to this occurrence.

Eduardo Abinader (2):
  Don't ignore RTM_NEWLINK, when ifname has changed
  Avoid invalid read in scan_callback

 gsupplicant/supplicant.c |  3 +++
 include/device.h         |  1 +
 src/detect.c             | 15 +++++++++++++--
 src/device.c             | 20 ++++++++++++++++++++
 4 files changed, 37 insertions(+), 2 deletions(-)

-- 
1.9.1

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to