bug in nl_cache_mngr_data_ready / nl_cache_refill / nl_cache_resync [+patch proposition]
Thomas Graf
tgraf at infradead.org
Thu Apr 19 13:09:10 EDT 2012
On Thu, Apr 12, 2012 at 05:16:18PM -0400, Brett Ciphery wrote:
> commit 6556567d7db11712bed32c9c4cfa1b6560d16da1
> Author: Brett Ciphery <brett.ciphery at windriver.com>
> Date: Thu Apr 12 16:57:52 2012 -0400
>
> make recvmsgs() repeatedly call nl_recv() until error
>
> recvmsgs() was not processing all messages available in
> the socket and instead was handling one per call. this
> had other transient effects such as not fully updating a
> cache when explicitly requested to do so using
> nl_cache_mngr_data_ready().
>
> Signed-off-by: Brett Ciphery <brett.ciphery at windriver.com>
Good catch Brett
Unfortunately I believe we can't change the behaviour of
nl_recvmsgs() from reading a single netlink message to
multiple by default. That would possibly break a lot of
applications.
What we can do is extend recvmsgs() do offer both behaviours
and have the cache manager direct it to continue reading
as long as there is data.
I'll fix that. I'm planning to look into and improve the
cache manager anyway. It's not reliable enough at the moment.
More information about the libnl
mailing list