wireless scanning removes link address from cache manager

Andrew Collins bsderandrew at gmail.com
Fri Aug 3 16:22:41 EDT 2012


Here's the code snippit I'm using:

--- a/libnl/lib/route/link.c	Fri Aug 03 11:15:09 2012 -0600
+++ b/libnl/lib/route/link.c	Fri Aug 03 11:48:44 2012 -0600
@@ -309,6 +309,12 @@
 		goto errout;
 	}

+	/* Skip wireless events from legacy wireless drivers. */
+	if (tb[IFLA_WIRELESS] != NULL) {
+		err = NL_SKIP;
+		goto errout;
+	}
+
 	nla_strlcpy(link->l_name, tb[IFLA_IFNAME], IFNAMSIZ);

This works for my particular case, but doesn't seem entirely safe as
it requires all nl_cache_parse callers to understand NL_SKIP.

On Fri, Aug 3, 2012 at 11:47 AM, Gotthard, Petr
<Petr.Gotthard at honeywell.com> wrote:
> Hi,
>
> I have just a workaround: I did install a new co_event_filter for that cache (see nl_cache_get_ops) where I skip all messages that have no link address.
>
>
> Petr



More information about the libnl mailing list