Issues with rtnl_neigh_get on RHEL 7.0 and RHEL 7.1

Thomas Haller thaller at redhat.com
Wed Sep 30 05:00:22 PDT 2015


On Tue, 2015-08-18 at 14:32 +0000, Haggai Abramovsky wrote:
> The following commit:
> 64fcb47 Add AF_BRIDGE support to neigh cache
> 
> Added the following check:
> @@ -496,7 +515,8 @@ struct rtnl_neigh * rtnl_neigh_get(struct
> nl_cache *cache, int ifindex,
>         struct rtnl_neigh *neigh;
> 
>         nl_list_for_each_entry(neigh, &cache->c_items, ce_list) {
> -           if (neigh->n_ifindex == ifindex &&
> +         if (neigh->n_family == AF_UNSPEC &&
> +             neigh->n_ifindex == ifindex &&
>                     !nl_addr_cmp(neigh->n_dst, dst)) {
>                         nl_object_get((struct nl_object *) neigh);
>                         return neigh;
> 
> Which was later removed by the following commit:
> 8571f58 neigh: Remove check for AF_UNSPEC in rtnl_neigh_get()
> 
> Between these two commits, when the n_family doesn't equal to
> AF_UNSPEC, the libnl won't search for neighbor in the cache, and will
> return NULL.
> 
> RHEL 7.0 and RHEL 7.1 has the previous check, which causes our
> library, that uses the libnl, to fail although the neighbor is in
> cache.


as a follow-up for the libnl mailinglist:

in RHEL-7.2 this will be fixed by version libnl3-3.2.21-10.el7
( https://bugzilla.redhat.com/show_bug.cgi?id=1261028 )


Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20150930/2ad1ac14/attachment.sig>


More information about the libnl mailing list