]> git.proxmox.com Git - mirror_frr.git/commitdiff
*: remove empty "interface XYZ" config blocks
authorDavid Lamparter <equinox@diac24.net>
Fri, 5 Feb 2010 08:48:45 +0000 (09:48 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 29 Aug 2017 06:36:03 +0000 (08:36 +0200)
Using the previously-added vty_frame() support, this gets rid of all the
pointless empty "interface XYZ" blocks that get added for any interface
that shows up in the system (e.g. dummys, tunnels, etc.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
babeld/babel_interface.c
eigrpd/eigrp_vty.c
isisd/isis_circuit.c
nhrpd/nhrp_vty.c
ospf6d/ospf6_interface.c
ospfd/ospf_vty.c
pimd/pim_vty.c
ripd/rip_interface.c
ripngd/ripng_interface.c
zebra/interface.c

index 9fa32ee6fa6f8acf2b1e03d24e744e9f0b391f03..2895ac1e698289b3199eb82af9a691b0f84f28a9 100644 (file)
@@ -1321,7 +1321,7 @@ interface_config_write (struct vty *vty)
     int write = 0;
 
     for (ALL_LIST_ELEMENTS_RO (vrf_iflist(VRF_DEFAULT), node, ifp)) {
-        vty_out (vty, "interface %s\n",ifp->name);
+        vty_frame (vty, "interface %s\n",ifp->name);
         if (ifp->desc)
             vty_out (vty, " description %s\n",ifp->desc);
         babel_interface_nfo *babel_ifp = babel_get_if_nfo (ifp);
@@ -1377,7 +1377,7 @@ interface_config_write (struct vty *vty)
                 write++;
             }
         }
-        vty_out (vty, "!\n");
+        vty_endframe (vty, "!\n");
         write++;
     }
     return write;
index 4a8842f30e9c65dd8fb7101b3768cbd152e6b736..5c657b6db5671b10885d9af2c831af7d46e97b6e 100644 (file)
@@ -93,7 +93,7 @@ static int config_write_interfaces(struct vty *vty, struct eigrp *eigrp)
        struct listnode *node;
 
        for (ALL_LIST_ELEMENTS_RO(eigrp->eiflist, node, ei)) {
-               vty_out(vty, "interface %s\n", ei->ifp->name);
+               vty_frame(vty, "interface %s\n", ei->ifp->name);
 
                if ((IF_DEF_PARAMS(ei->ifp)->auth_type)
                    == EIGRP_AUTH_TYPE_MD5) {
@@ -128,7 +128,7 @@ static int config_write_interfaces(struct vty *vty, struct eigrp *eigrp)
                }
 
                /*Separate this EIGRP interface configuration from the others*/
-               vty_out(vty, "!\n");
+               vty_endframe(vty, "!\n");
        }
 
        return 0;
@@ -140,7 +140,7 @@ static int eigrp_write_interface(struct vty *vty)
        struct interface *ifp;
 
        for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), node, ifp)) {
-               vty_out(vty, "interface %s\n", ifp->name);
+               vty_frame(vty, "interface %s\n", ifp->name);
 
                if (ifp->desc)
                        vty_out(vty, " description %s\n", ifp->desc);
@@ -157,7 +157,7 @@ static int eigrp_write_interface(struct vty *vty)
                        vty_out(vty, " ip hold-time eigrp %u\n",
                                IF_DEF_PARAMS(ifp)->v_wait);
 
-               vty_out(vty, "!\n");
+               vty_endframe(vty, "!\n");
        }
 
        return 0;
index a1aa87e396d15ecbfc7333a90eca2c6c12304a4a..7dd83039075b735ffab0a7602c4680a22237d954 100644 (file)
@@ -948,7 +948,7 @@ int isis_interface_config_write(struct vty *vty)
                        continue;
 
                /* IF name */
-               vty_out(vty, "interface %s\n", ifp->name);
+               vty_frame(vty, "interface %s\n", ifp->name);
                write++;
                /* IF desc */
                if (ifp->desc) {
@@ -1145,7 +1145,7 @@ int isis_interface_config_write(struct vty *vty)
                        }
                        write += circuit_write_mt_settings(circuit, vty);
                }
-               vty_out(vty, "!\n");
+               vty_endframe(vty, "!\n");
        }
 
        return write;
index 6d78fc1d2b25f37cc52dda164251a8f4dca79491..bd5b1aa6f164704ee9f5f87ca8eadfd5dc8faf6a 100644 (file)
@@ -854,7 +854,7 @@ static int interface_config_write(struct vty *vty)
        int i;
 
        for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), node, ifp)) {
-               vty_out (vty, "interface %s\n", ifp->name);
+               vty_frame(vty, "interface %s\n", ifp->name);
                if (ifp->desc)
                        vty_out (vty, " description %s\n", ifp->desc);
 
@@ -913,7 +913,7 @@ static int interface_config_write(struct vty *vty)
                        }
                }
 
-               vty_out (vty, "!\n");
+               vty_endframe(vty, "!\n");
        }
 
        return 0;
index bb63fb966ed8b6c7e868a1188dbbb39d7bd9dd79..8cfed81a810b318131651c0017fcceea9d83cc7f 100644 (file)
@@ -1755,7 +1755,7 @@ static int config_write_ospf6_interface(struct vty *vty)
                if (oi == NULL)
                        continue;
 
-               vty_out(vty, "interface %s\n", oi->interface->name);
+               vty_frame(vty, "interface %s\n", oi->interface->name);
 
                if (ifp->desc)
                        vty_out(vty, " description %s\n", ifp->desc);
@@ -1808,7 +1808,7 @@ static int config_write_ospf6_interface(struct vty *vty)
 
                ospf6_bfd_write_config(vty, oi);
 
-               vty_out(vty, "!\n");
+               vty_endframe(vty, "!\n");
        }
        return 0;
 }
index 87aef1ea97b615358de6a716cd2c98150cc3d90a..fd392fcc7dc1bd60d4c8d6863b8de92c3261affb 100644 (file)
@@ -8152,8 +8152,8 @@ static int config_write_interface(struct vty *vty)
                if (ifp->ifindex == IFINDEX_DELETED)
                        continue;
 
-               vty_out(vty, "!\n");
-               vty_out(vty, "interface %s\n", ifp->name);
+               vty_frame(vty, "!\n");
+               vty_frame(vty, "interface %s\n", ifp->name);
                if (ifp->desc)
                        vty_out(vty, " description %s\n", ifp->desc);
 
@@ -8367,6 +8367,8 @@ static int config_write_interface(struct vty *vty)
                } while (rn);
 
                ospf_opaque_config_write_if(vty, ifp);
+
+               vty_endframe(vty, NULL);
        }
 
        return write;
index 8914f6eb00518107788dd9c8994136cf25b30856..6eb413a4eb8e78d9698a99d5609f1fc25186fd77 100644 (file)
@@ -255,7 +255,7 @@ int pim_interface_config_write(struct vty *vty)
 
                        /* IF name */
                        if (vrf->vrf_id == VRF_DEFAULT)
-                               vty_out(vty, "interface %s\n", ifp->name);
+                               vty_frame(vty, "interface %s\n", ifp->name);
                        else
                                vty_out(vty, "interface %s vrf %s\n", ifp->name,
                                        vrf->name);
@@ -363,7 +363,7 @@ int pim_interface_config_write(struct vty *vty)
                                        pim_static_write_mroute(pim, vty, ifp);
                                pim_bfd_write_config(vty, ifp);
                        }
-                       vty_out(vty, "!\n");
+                       vty_endframe(vty, "!\n");
                        ++writes;
                }
        }
index 00b6d1cadd2aaafc3ed15d9e7b523fc2583eaf3c..1b2cbb61c32c7d0aae466a4f6423dbaf22261f6c 100644 (file)
@@ -1751,7 +1751,7 @@ static int rip_interface_config_write(struct vty *vty)
                    && (!ri->auth_str) && (!ri->key_chain))
                        continue;
 
-               vty_out(vty, "interface %s\n", ifp->name);
+               vty_frame(vty, "interface %s\n", ifp->name);
 
                if (ifp->desc)
                        vty_out(vty, " description %s\n", ifp->desc);
@@ -1807,7 +1807,7 @@ static int rip_interface_config_write(struct vty *vty)
                        vty_out(vty, " ip rip authentication key-chain %s\n",
                                ri->key_chain);
 
-               vty_out(vty, "!\n");
+               vty_endframe(vty, "!\n");
        }
        return 0;
 }
index 02fab6825483b48a77449e905063ec0e7c9ee78a..5c65f522ef826445e231bfba01dcb43bcedcfce4 100644 (file)
@@ -1084,7 +1084,7 @@ static int interface_config_write(struct vty *vty)
                    && (ri->split_horizon == ri->split_horizon_default))
                        continue;
 
-               vty_out(vty, "interface %s\n", ifp->name);
+               vty_frame(vty, "interface %s\n", ifp->name);
                if (ifp->desc)
                        vty_out(vty, " description %s\n", ifp->desc);
 
@@ -1105,7 +1105,7 @@ static int interface_config_write(struct vty *vty)
                        }
                }
 
-               vty_out(vty, "!\n");
+               vty_endframe(vty, "!\n");
 
                write++;
        }
index c17e408ea0e062903fb19ec91a3969228f57854d..9e2e1161459ec118fd7869505f4665eeba14020e 100644 (file)
@@ -2791,7 +2791,7 @@ static int if_config_write(struct vty *vty)
                vrf = vrf_lookup_by_id(ifp->vrf_id);
 
                if (ifp->vrf_id == VRF_DEFAULT)
-                       vty_out(vty, "interface %s\n", ifp->name);
+                       vty_frame(vty, "interface %s\n", ifp->name);
                else
                        vty_out(vty, "interface %s vrf %s\n", ifp->name,
                                vrf->name);
@@ -2842,7 +2842,7 @@ static int if_config_write(struct vty *vty)
 
                link_params_config_write(vty, ifp);
 
-               vty_out(vty, "!\n");
+               vty_endframe(vty, "!\n");
        }
        return 0;
 }