[PATCH] Fix typo in rtnl_neigh_get()

Thomas Graf tgraf at suug.ch
Fri Feb 1 04:47:40 EST 2013

On 01/31/13 at 07:29am, Roopa Prabhu wrote:
> Looking at it some more. I think the condition should be changed to
> neigh->n_family != AF_BRIDGE to keep it safe, as the AF_BRIDGE
> family objects dont have n_dst.
> And this will also skip AF_BRIDGE objects from the search which was
> the real intention of my original patch.
> Maxime, your patch would work if you changed AF_UNSPEC to AF_BRIDGE.
> If you agree, Can you please resubmit ?. Thanks.

I fixed this with the following commit:

commit 8571f58f23763d8db7365d02c9b27832ad3d7005
Author: Thomas Graf <tgraf at suug.ch>
Date:   Fri Feb 1 10:41:45 2013 +0100

    neigh: Remove check for AF_UNSPEC in rtnl_neigh_get()
    This check was introduces to not accidently return AF_BRIDGE objects
    to unaware API users as they do differ in structure. However, such
    objects are only available if explicitely requests using the
    NL_CACHE_AF_ITER flag or by using arg1 == AF_BRIDGE for the cache.
    Therefore remove this check and allow rtnl_neigh_get() to be used to
    fetch any neighbor object of a cache.
    Reported-by: Maxime Bizon <mbizon at freebox.fr>
    Signed-off-by: Thomas Graf <tgraf at suug.ch>

More information about the libnl mailing list