]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: optimize if_lookup_by_name_all_vrf
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 13 Oct 2021 20:23:41 +0000 (23:23 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 13 Oct 2021 20:23:41 +0000 (23:23 +0300)
We already have a VRF pointer, no need to search for it again.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
lib/if.c

index 424880ff425a3a21e852f4a359f76b0682151efc..ef73ab2525ffaaa148729699da3a581c5bfe95b2 100644 (file)
--- 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;
        }