[PATCH] hostapd: Support SO_BINDTODEVICE for radius client.

Jouni Malinen j at w1.fi
Sat Feb 27 04:43:12 EST 2021


On Fri, Jun 12, 2020 at 01:08:32PM +0200, Andreas Tobler wrote:
> thanks for this patch. We applied it locally and with some modifications we
> got it to work.
> 
> The most important modification for us was to move the 'force disconnect
> part', the one which follows after the client-addr bind, before we do the
> SO_BINDTODEVICE.
> If we do a connect with the disconnect_addr which has a sin_family
> AF_UNSPEC, we loose the SO_BINDTODEVICE on the socket.
> This is the reason we moved it right before we bind the device.
> 
> The second modification is the usage of setsockopt(). Your's was not wrong
> but irritating while reading the first time. We just use the devicename and
> its length for the 4th and 5th argument instead of the irfeq.
> 
> Attached the updated patch with our modifications.

Thanks, applied with fixes and cleanup.
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list