[PATCH] Fix typo in rtnl_neigh_get()
Rich Fought
rmf.aero at gmail.com
Thu Jan 31 09:48:36 EST 2013
Given Roopa's last patch to remove the AF_UNSPEC check from
rtnl_get_link() and rtnl_get_link_by_name(), perhaps it should be
removed from here altogether as well? Are there other functions that
needs to be reverted in this way?
On 1/31/2013 6:40 AM, Maxime Bizon wrote:
> From: Maxime Bizon <mbizon at freebox.fr>
>
> Fix typo in rtnl_neigh_get()
>
> Signed-off-by: Maxime Bizon <mbizon at freebox.fr>
> ---
> lib/route/neigh.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/route/neigh.c b/lib/route/neigh.c
> index c0f80a2..3ccb126 100644
> --- a/lib/route/neigh.c
> +++ b/lib/route/neigh.c
> @@ -540,7 +540,7 @@ 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_family == AF_UNSPEC &&
> + if (neigh->n_family != AF_UNSPEC &&
> neigh->n_ifindex == ifindex &&
> !nl_addr_cmp(neigh->n_dst, dst)) {
> nl_object_get((struct nl_object *) neigh);
More information about the libnl
mailing list