]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: remove duplicated code
authorIgor Ryzhov <iryzhov@nfware.com>
Sun, 17 Sep 2023 19:34:51 +0000 (22:34 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Sun, 17 Sep 2023 19:54:17 +0000 (22:54 +0300)
The same thing is done in zebra_if_update_link a couple of lines above.

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

index 9570391c93bfd6b86fdf425fa0c6d9dbb2a6f3a1..92ae8a9dc5e522fceca5b91ac7a9de3f3ce05ae9 100644 (file)
@@ -2051,6 +2051,8 @@ static void zebra_if_dplane_ifp_handling(struct zebra_dplane_ctx *ctx)
                                        if_update_to_new_vrf(ifp, vrf_id);
                        }
 
+                       zif = ifp->info;
+
                        /* Update interface information. */
                        set_ifindex(ifp, ifindex, zns);
                        ifp->flags = flags;
@@ -2069,16 +2071,6 @@ static void zebra_if_dplane_ifp_handling(struct zebra_dplane_ctx *ctx)
                        /* Update link. */
                        zebra_if_update_link(ifp, link_ifindex, link_nsid);
 
-                       /*
-                        * Just set the @link/lower-device ifindex. During
-                        * nldump interfaces are not ordered in any fashion so
-                        * we may end up getting upper devices before lower
-                        * devices. We will setup the real linkage once the dump
-                        * is complete.
-                        */
-                       zif = (struct zebra_if *)ifp->info;
-                       zif->link_ifindex = link_ifindex;
-
                        ifp->ll_type = dplane_ctx_get_ifp_zltype(ctx);
                        interface_update_hw_addr(ctx, ifp);