]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Suppress 'ip forwarding' in configuration output
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 21 Jun 2016 19:57:22 +0000 (19:57 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 21 Jun 2016 19:57:22 +0000 (19:57 +0000)
Since IP forwarding is enabled by default on Quagga startup, it
makes more sense to only explicitly report the state of this
setting when it is disabled. Inverted the relevant printouts.

Ticket: CM-11462

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
zebra/zserv.c

index 0207a3722f6f0acad8020a790405657fa5a4b7a4..daecaf5e108b982920330acec05eb479b507d0df 100644 (file)
@@ -2670,11 +2670,11 @@ config_write_forwarding (struct vty *vty)
   /* FIXME: Find better place for that. */
   router_id_write (vty);
 
-  if (ipforward ())
-    vty_out (vty, "ip forwarding%s", VTY_NEWLINE);
+  if (!ipforward ())
+    vty_out (vty, "no ip forwarding%s", VTY_NEWLINE);
 #ifdef HAVE_IPV6
-  if (ipforward_ipv6 ())
-    vty_out (vty, "ipv6 forwarding%s", VTY_NEWLINE);
+  if (!ipforward_ipv6 ())
+    vty_out (vty, "no ipv6 forwarding%s", VTY_NEWLINE);
 #endif /* HAVE_IPV6 */
   vty_out (vty, "!%s", VTY_NEWLINE);
   return 0;