wireless scanning removes link address from cache manager

Gotthard, Petr Petr.Gotthard at Honeywell.com
Fri Nov 29 06:05:22 EST 2013

Hello again,

I'm trying to upgrade to the latest libnl and discovered that the old error (wifi mac address disappearing from the cache) is still present (see below).

I used to use a workaround: a new co_event_filter for that cache (see nl_cache_get_ops) where I skip all messages that have no link address. But I cannot use this with the latest libnl because the co_event_filter is now private and I can set it from an user application.

What would the correct approach with 3.2.23? Could there be a public function to set an event_filter?


-----Original Message-----
From: Thomas Graf [mailto:tgr at infradead.org] On Behalf Of Thomas Graf
Sent: 9. července 2012 22:51
To: Gotthard, Petr
Cc: libnl at lists.infradead.org
Subject: Re: wireless scanning removes link address from cache manager

On Mon, Jul 09, 2012 at 06:15:10PM +0000, Gotthard, Petr wrote:
> Hello,
> I'm experiencing the following behavior using kernel 3.3.4-5.fc17.i686.PAE and the latest libnl:
> I start the libnl cache manager ("test-cache-mngr route/link") and then scan for wireless networks ("iw wlan0 scan"). After the results are printed the link/MAC address for the scanned wireless link (wlan0) disappears from the cache manager.
> I realized that when the wireless link scanning produces results, the kernel also sends a RTM_NEWLINK event (for that link). This event has no address field. This event is then received and processed by the libnl cache manager and the "updated" link status (without the link address) is stored by the link manager.
> This probably explains why the address is gone, but do you please have any idea what is wrong: kernel or libnl?

It's probably libnl's fault. It should filter out these messages as they are not object update notifications but indicate some other event. I'll look into this.

More information about the libnl mailing list