[PATCH] nl80211: Fix compatibility with older version of libnl

Peer, Ilan ilan.peer at intel.com
Thu Oct 2 02:41:47 EDT 2014


Great :)

> -----Original Message-----
> From: hostap-bounces at lists.shmoo.com [mailto:hostap-
> bounces at lists.shmoo.com] On Behalf Of Jonathan Bither
> Sent: Wednesday, October 01, 2014 16:18
> To: hostap at lists.shmoo.com
> Subject: Re: [PATCH] nl80211: Fix compatibility with older version of libnl
> 
> Thanks Ilan,
> 
> your patch does indeed fix the issue for me.
> 
> On 10/01/2014 02:01 AM, Ilan Peer wrote:
> > Commit "nl80211: Remove bridge FDB entry upon sta_remove()" used
> > nl_sock and nl_socket_* functions which are not compatible with older
> > versions of libnl. Fix this.
> >
> > Signed-off-by: Ilan Peer <ilan.peer at intel.com>
> > ---
> >   src/drivers/driver_nl80211.c |    6 +++---
> >   1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/drivers/driver_nl80211.c
> > b/src/drivers/driver_nl80211.c index 5c922a0..e9e44c0 100644
> > --- a/src/drivers/driver_nl80211.c
> > +++ b/src/drivers/driver_nl80211.c
> > @@ -331,7 +331,7 @@ struct wpa_driver_nl80211_data {
> >
> >   	int eapol_sock; /* socket for EAPOL frames */
> >
> > -	struct nl_sock *rtnl_sk; /* nl_sock for NETLINK_ROUTE */
> > +	struct nl_handle *rtnl_sk; /* nl_sock for NETLINK_ROUTE */
> >
> >   	int default_if_indices[16];
> >   	int *if_indices;
> > @@ -4938,7 +4938,7 @@ static void wpa_driver_nl80211_deinit(struct
> i802_bss *bss)
> >   				   "interface %s from bridge %s: %s",
> >   				   bss->ifname, bss->brname,
> strerror(errno));
> >   		if (drv->rtnl_sk)
> > -			nl_socket_free(drv->rtnl_sk);
> > +			nl80211_handle_destroy(drv->rtnl_sk);
> >   	}
> >   	if (bss->added_bridge) {
> >   		if (linux_br_del(drv->global->ioctl_sock, bss->brname) < 0)
> @@
> > -10104,7 +10104,7 @@ static void *i802_init(struct hostapd_data *hapd,
> >
> >   #ifdef CONFIG_LIBNL3_ROUTE
> >   	if (bss->added_if_into_bridge) {
> > -		drv->rtnl_sk = nl_socket_alloc();
> > +		drv->rtnl_sk = nl80211_handle_alloc();
> >   		if (drv->rtnl_sk == NULL) {
> >   			wpa_printf(MSG_ERROR, "nl80211: Failed to allocate
> nl_sock");
> >   			goto failed;
> >
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap


More information about the HostAP mailing list