summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-10-13 23:23:41 +0300
committerIgor Ryzhov <iryzhov@nfware.com>2021-10-13 23:23:41 +0300
commit5393f4db3fc4af608faf2ccc1277fbe79fe42609 (patch)
tree15d3edbccd7613d54d0007ce1a70e17f3eb6af2a /lib/if.c
parentd759866d5b9026f8761bf89dfc9c4107cc1df764 (diff)
lib: optimize if_lookup_by_name_all_vrf
We already have a VRF pointer, no need to search for it again. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/if.c b/lib/if.c
index 424880ff42..ef73ab2525 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -440,7 +440,7 @@ struct interface *if_lookup_by_name_all_vrf(const char *name)
return NULL;
RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) {
- ifp = if_lookup_by_name(name, vrf->vrf_id);
+ ifp = if_lookup_by_name_vrf(name, vrf);
if (ifp)
return ifp;
}