]> git.ipfire.org Git - thirdparty/hostap.git/commit - src/drivers/driver_nl80211.c
nl80211: Fix RTM NEW/DELLINK IFLA_IFNAME copy for maximum ifname length
authorOuden <Ouden.Biz@gmail.com>
Wed, 18 Mar 2020 09:58:37 +0000 (17:58 +0800)
committerJouni Malinen <j@w1.fi>
Sat, 21 Mar 2020 15:12:29 +0000 (17:12 +0200)
commit7546c489a95a033c78331915fcdfa0e6fd74d563
tree7bd0cee4a6d3d71078084e5dffe86d2b7f902b77
parent22547c31480fa24f6685b26e43ce73043e7fbaec
nl80211: Fix RTM NEW/DELLINK IFLA_IFNAME copy for maximum ifname length

If the kernel rtm_newlink or rtm_dellink send the maximum length of
ifname (IFNAMSIZ), the event handlers in
wpa_driver_nl80211_event_rtm_addlink() and
wpa_driver_nl80211_event_rtm_dellink() did not copy the IFLA_IFNAME
value. Because the RTA_PAYLOAD (IFLA_IFNAME) length already includes the
NULL termination, that equals the IFNAMSIZ.

Fix the condition when IFNAME reach maximum size.

Signed-off-by: Ouden <Ouden.Biz@gmail.com>
src/drivers/driver_nl80211.c