nl80211: Check if_indextoname() return value for bridge events
authorJouni Malinen <j@w1.fi>
Tue, 23 Dec 2014 17:35:34 +0000 (19:35 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 23 Dec 2014 17:43:24 +0000 (19:43 +0200)
commit40e7639600e10ff7608a573bf5a5b71ebe08c280
treec5507547e90e57e81b2ee099f9e9bde1b9648c7f
parent6d930a1eef10cb020cadb2b2d394a48c363fb436
nl80211: Check if_indextoname() return value for bridge events

It would be at least theoretically possible for the bridge netdev to
have disappeared at the time hostapd processes the RTM newlink/dellink
message. As such, it is better to verify that if_indextoname() actually
returned success before printing the bridge ifname in debug. In
addition, there is not much point trying to add the bridge ifindex into
the list of own ifindexes in case the interface has already been
removed, so skip that part as well.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver_nl80211.c