summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/route/link.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/route/link.c b/lib/route/link.c
index 3171513..8b5227e 100644
--- a/lib/route/link.c
+++ b/lib/route/link.c
@@ -986,7 +986,7 @@ struct rtnl_link *rtnl_link_get(struct nl_cache *cache, int ifindex)
return NULL;
nl_list_for_each_entry(link, &cache->c_items, ce_list) {
- if (link->l_family == AF_UNSPEC && link->l_index == ifindex) {
+ if (link->l_index == ifindex) {
nl_object_get((struct nl_object *) link);
return link;
}
@@ -1019,8 +1019,7 @@ struct rtnl_link *rtnl_link_get_by_name(struct nl_cache *cache,
return NULL;
nl_list_for_each_entry(link, &cache->c_items, ce_list) {
- if (link->l_family == AF_UNSPEC &&
- !strcmp(name, link->l_name)) {
+ if (!strcmp(name, link->l_name)) {
nl_object_get((struct nl_object *) link);
return link;
}