summaryrefslogtreecommitdiffstats
path: root/zebra/rtadv.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2010-02-05 09:48:45 +0100
committerDavid Lamparter <equinox@diac24.net>2010-02-05 09:51:24 +0100
commit55d24e7f3dbc69db37781dbff325bda0779778df (patch)
treea2b2525677332fd92ccc66a4c6082c620ba27802 /zebra/rtadv.c
parent647e8e064d8e5316fc89587714a056b1240fa298 (diff)
downloadquagga-55d24e7f3dbc69db37781dbff325bda0779778df.tar.bz2
quagga-55d24e7f3dbc69db37781dbff325bda0779778df.tar.xz
lib: get rid of extraneous output with vty_prepend
the vty_*prepend* family can be used to reduce the amount of output produced by "show running-config" and "write ...". it buffers output in struct vty->prepend (1024 bytes) and outputs it when vty_out is called. if vty_out isn't called, it can be removed with vty_unprepend later. applied on zebra and ospfd to get rid of empty interface blocks.
Diffstat (limited to 'zebra/rtadv.c')
-rw-r--r--zebra/rtadv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 8cc3c4cb..d66d4e42 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -1450,7 +1450,12 @@ rtadv_config_write (struct vty *vty, struct interface *ifp)
if (zif->rtadv.AdvSendAdvertisements)
vty_out (vty, " no ipv6 nd suppress-ra%s", VTY_NEWLINE);
else
- vty_out (vty, " ipv6 nd suppress-ra%s", VTY_NEWLINE);
+ {
+ if (vty_prepending (vty))
+ vty_prepend (vty, " ipv6 nd suppress-ra%s", VTY_NEWLINE);
+ else
+ vty_out (vty, " ipv6 nd suppress-ra%s", VTY_NEWLINE);
+ }
}