]> git.proxmox.com Git - mirror_frr.git/commitdiff
*: eliminate IFINDEX_DELETED in favor of IFINDEX_INTERNAL
authorRenato Westphal <renato@opensourcerouting.org>
Tue, 3 Oct 2017 01:06:03 +0000 (22:06 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Tue, 10 Oct 2017 12:05:02 +0000 (09:05 -0300)
IFINDEX_DELETED is not necessary anymore as we moved from a global
list of interfaces to a list of interfaces per VRF.

This reverts commit 84361d615.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
bgpd/bgp_zebra.c
isisd/isis_circuit.c
isisd/isis_zebra.c
ldpd/ldp_zebra.c
lib/if.h
ospf6d/ospf6_zebra.c
ospfd/ospf_vty.c
ospfd/ospf_zebra.c
ripd/rip_interface.c
ripngd/ripng_interface.c

index 9c8f56636c37f3905359c82cb211184c6be954c9..ae8f2f26d4cbc823c320a4d78569a59a439da71d 100644 (file)
@@ -238,7 +238,7 @@ static int bgp_interface_delete(int command, struct zclient *zclient,
 
        bgp_update_interface_nbrs(bgp, ifp, NULL);
 
-       ifp->ifindex = IFINDEX_DELETED;
+       ifp->ifindex = IFINDEX_INTERNAL;
        return 0;
 }
 
index 761e73aa83c7d4d789c771c5971c662789079a74..939dc71beebfc7ccc08b62ee6cb086a76400f1f1 100644 (file)
@@ -941,9 +941,6 @@ int isis_interface_config_write(struct vty *vty)
        int i;
 
        RB_FOREACH (ifp, if_name_head, &vrf->ifaces_by_name) {
-               if (ifp->ifindex == IFINDEX_DELETED)
-                       continue;
-
                /* IF name */
                vty_frame(vty, "interface %s\n", ifp->name);
                write++;
index bc81314097f1429631cc3472641e3a3c1f24cf03..7109bfb110b8ff62344ec0aa5161ee3e730c6ec5 100644 (file)
@@ -128,7 +128,7 @@ static int isis_zebra_if_del(int command, struct zclient *zclient,
           in case there is configuration info attached to it. */
        if_delete_retain(ifp);
 
-       ifp->ifindex = IFINDEX_DELETED;
+       ifp->ifindex = IFINDEX_INTERNAL;
 
        return 0;
 }
index 2dda5f57bf608770b015bce2c49dc327c97e5443..4b3f5b0f99ca6fa5137f81b356cdcdcd534f482a 100644 (file)
@@ -288,7 +288,7 @@ ldp_interface_delete(int command, struct zclient *zclient, zebra_size_t length,
 
        /* To support pseudo interface do not free interface structure.  */
        /* if_delete(ifp); */
-       ifp->ifindex = IFINDEX_DELETED;
+       ifp->ifindex = IFINDEX_INTERNAL;
 
        ifp2kif(ifp, &kif);
        main_imsg_compose_both(IMSG_IFSTATUS, &kif, sizeof(kif));
index a8058c9e9e1074dc8bec80812251a2bde33ed796..d4ae8fc4296c89e49c5cea9b8a3c5b8ba32eb267 100644 (file)
--- a/lib/if.h
+++ b/lib/if.h
@@ -217,7 +217,6 @@ struct interface {
           deleted interfaces). */
        ifindex_t ifindex;
 #define IFINDEX_INTERNAL       0
-#define IFINDEX_DELETED         INT_MAX
 
        /* Zebra internal interface status */
        u_char status;
index 30bb4393c7e1a820f02ed09d7c254c86109043e3..14dc6aa30b6adc9cf8ca8f26638fffb9d1a68e66 100644 (file)
@@ -126,7 +126,7 @@ static int ospf6_zebra_if_del(int command, struct zclient *zclient,
   ospf6_interface_if_del (ifp);
 #endif /*0*/
 
-       ifp->ifindex = IFINDEX_DELETED;
+       ifp->ifindex = IFINDEX_INTERNAL;
        return 0;
 }
 
index 3c709df384caa7f6d4d591d027dd44b373d011a9..a755bb7e65d941679628224e201ab709863ea302 100644 (file)
@@ -8647,9 +8647,6 @@ static int config_write_interface_one(struct vty *vty, struct ospf *ospf)
                if (memcmp(ifp->name, "VLINK", 5) == 0)
                        continue;
 
-               if (ifp->ifindex == IFINDEX_DELETED)
-                       continue;
-
                vrf = vrf_lookup_by_id(ifp->vrf_id);
 
                vty_frame(vty, "!\n");
index 0697c7801f51e8b12a105f88d087a8daa721cd4f..a171e5f046f2ca64fc00d45b2192c48dfe5f2b90 100644 (file)
@@ -166,7 +166,7 @@ static int ospf_interface_delete(int command, struct zclient *zclient,
                if (rn->info)
                        ospf_if_free((struct ospf_interface *)rn->info);
 
-       ifp->ifindex = IFINDEX_DELETED;
+       ifp->ifindex = IFINDEX_INTERNAL;
        return 0;
 }
 
index fe72de229f51eca11315252b8e89b86b1e1c9410..6fba0512e584fdb84a5658cc86d373f1daea69fa 100644 (file)
@@ -471,7 +471,7 @@ int rip_interface_delete(int command, struct zclient *zclient,
 
        /* To support pseudo interface do not free interface structure.  */
        /* if_delete(ifp); */
-       ifp->ifindex = IFINDEX_DELETED;
+       ifp->ifindex = IFINDEX_INTERNAL;
 
        return 0;
 }
@@ -1734,9 +1734,6 @@ static int rip_interface_config_write(struct vty *vty)
        RB_FOREACH (ifp, if_name_head, &vrf->ifaces_by_name) {
                struct rip_interface *ri;
 
-               if (ifp->ifindex == IFINDEX_DELETED)
-                       continue;
-
                ri = ifp->info;
 
                /* Do not display the interface if there is no
index aab2b232454e5011272d9072f6e39c9b8b02db18..dbee3ce69ff8a0b10e3d65ed6cc6688b55c70365 100644 (file)
@@ -299,7 +299,7 @@ int ripng_interface_delete(int command, struct zclient *zclient,
 
        /* To support pseudo interface do not free interface structure.  */
        /* if_delete(ifp); */
-       ifp->ifindex = IFINDEX_DELETED;
+       ifp->ifindex = IFINDEX_INTERNAL;
 
        return 0;
 }