summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2010-02-05 09:48:45 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2017-08-29 08:36:03 +0200
commita8b828f3c3e55eacdfba77f31750ada20ed13390 (patch)
tree20d2bc44805e3c2c8278edf2c48c1e0163dfcbbd
parentlib: add vty_frame() to get rid of unneeded config (diff)
downloadfrr-a8b828f3c3e55eacdfba77f31750ada20ed13390.tar.xz
frr-a8b828f3c3e55eacdfba77f31750ada20ed13390.zip
*: remove empty "interface XYZ" config blocks
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>
-rw-r--r--babeld/babel_interface.c4
-rw-r--r--eigrpd/eigrp_vty.c8
-rw-r--r--isisd/isis_circuit.c4
-rw-r--r--nhrpd/nhrp_vty.c4
-rw-r--r--ospf6d/ospf6_interface.c4
-rw-r--r--ospfd/ospf_vty.c6
-rw-r--r--pimd/pim_vty.c4
-rw-r--r--ripd/rip_interface.c4
-rw-r--r--ripngd/ripng_interface.c4
-rw-r--r--zebra/interface.c4
10 files changed, 24 insertions, 22 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 9fa32ee6f..2895ac1e6 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -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;
diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c
index 4a8842f30..5c657b6db 100644
--- a/eigrpd/eigrp_vty.c
+++ b/eigrpd/eigrp_vty.c
@@ -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;
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index a1aa87e39..7dd830390 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -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;
diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c
index 6d78fc1d2..bd5b1aa6f 100644
--- a/nhrpd/nhrp_vty.c
+++ b/nhrpd/nhrp_vty.c
@@ -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;
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index bb63fb966..8cfed81a8 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -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;
}
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 87aef1ea9..fd392fcc7 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -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;
diff --git a/pimd/pim_vty.c b/pimd/pim_vty.c
index 8914f6eb0..6eb413a4e 100644
--- a/pimd/pim_vty.c
+++ b/pimd/pim_vty.c
@@ -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;
}
}
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index 00b6d1cad..1b2cbb61c 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -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;
}
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index 02fab6825..5c65f522e 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -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++;
}
diff --git a/zebra/interface.c b/zebra/interface.c
index c17e408ea..9e2e11614 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -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;
}