]> git.ipfire.org Git - thirdparty/hostap.git/commit
nl80211: Allocate nl_sock for NETLINK_ROUTE when already_in_bridge
authorSathishkumar Muruganandam <murugana@codeaurora.org>
Wed, 4 Jul 2018 09:31:02 +0000 (15:01 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 5 Jul 2018 10:36:27 +0000 (13:36 +0300)
commitc809756f9f01919cdab9976a71d9b52ca89c44b0
tree605ae9d2ef40b9101fa8d518b814577181febd08
parent946e35eace4db260c3d35684bfb06b2ec4bfae26
nl80211: Allocate nl_sock for NETLINK_ROUTE when already_in_bridge

When we start hostapd having Hotspot 2.0 configuration with interface
already added to bridge interface, addition and deletion of new neighbor
to bridge ip neighbor table fails.

This is since 'bss->added_if_into_bridge' is not set which only allows
'drv->rtnl_sk' (nl_sock for NETLINK_ROUTE) allocation needed for bridge
ip neighbor table.

Add a new bit 'already_in_bridge' and set it when interface is already
added to bridge by some external component. Check this bit in addition
to 'bss->added_if_into_bridge' for 'drv->rtnl_sk' allocation done in
i802_init().

Now 'drv->rtnl_sk' is closed in wpa_driver_nl80211_deinit() regardless of
'bss->added_if_into_bridge' since when we have 'bss->already_in_bridge'
case too, this need to be removed.

brctl show

bridge name     bridge id               STP enabled     interfaces
br0             8000.8efdf006b050       no              ap

hostapd_cli raw STATUS-DRIVER

Selected interface 'ap'
ifindex=15
ifname=ap
brname=br0
addr=8e:fd:f0:06:b0:50
freq=5180
beacon_set=1
already_in_bridge=1
..

Signed-off-by: Sathishkumar Muruganandam <murugana@codeaurora.org>
src/drivers/driver_nl80211.c
src/drivers/driver_nl80211.h