]> git.proxmox.com Git - mirror_frr.git/commitdiff
* zserv.c: Remove useless warnings "forwarding is already on".
authorhasso <hasso>
Wed, 13 Oct 2004 12:20:35 +0000 (12:20 +0000)
committerhasso <hasso>
Wed, 13 Oct 2004 12:20:35 +0000 (12:20 +0000)
zebra/ChangeLog
zebra/zserv.c

index 081cffe3de68f53500093befecc3b6e96c6c9be2..1284ede0ec390139cbec8fe4fcb2cceab9186d75 100644 (file)
@@ -2,6 +2,7 @@
 
        * zebra_snmp.c: Remove defaults used to initialize smux connection to
          snmpd. Connection is initialized only if smux peer is configured.
+       * zserv.c: Remove useless warnings "forwarding is already on".
 
 2004-10-12 Hasso Tepper <hasso at quagga.net>
 
index 5a0272d23e99605cbef7960b526a41e691216063..bb7937d1b50813f01f305bb8041012be1b189bab 100644 (file)
@@ -1552,14 +1552,9 @@ DEFUN (ip_forwarding,
   int ret;
 
   ret = ipforward ();
+  if (ret == 0)
+    ret = ipforward_on ();
 
-  if (ret != 0)
-    {
-      vty_out (vty, "IP forwarding is already on%s", VTY_NEWLINE);
-      return CMD_ERR_NOTHING_TODO;
-    }
-
-  ret = ipforward_on ();
   if (ret == 0)
     {
       vty_out (vty, "Can't turn on IP forwarding%s", VTY_NEWLINE);
@@ -1579,14 +1574,9 @@ DEFUN (no_ip_forwarding,
   int ret;
 
   ret = ipforward ();
+  if (ret != 0)
+    ret = ipforward_off ();
 
-  if (ret == 0)
-    {
-      vty_out (vty, "IP forwarding is already off%s", VTY_NEWLINE); 
-      return CMD_ERR_NOTHING_TODO;
-    }
-
-  ret = ipforward_off ();
   if (ret != 0)
     {
       vty_out (vty, "Can't turn off IP forwarding%s", VTY_NEWLINE);
@@ -1692,13 +1682,9 @@ DEFUN (ipv6_forwarding,
   int ret;
 
   ret = ipforward_ipv6 ();
-  if (ret != 0)
-    {
-      vty_out (vty, "IPv6 forwarding is already on%s", VTY_NEWLINE);
-      return CMD_ERR_NOTHING_TODO;
-    }
+  if (ret == 0)
+    ret = ipforward_ipv6_on ();
 
-  ret = ipforward_ipv6_on ();
   if (ret == 0)
     {
       vty_out (vty, "Can't turn on IPv6 forwarding%s", VTY_NEWLINE);
@@ -1718,13 +1704,9 @@ DEFUN (no_ipv6_forwarding,
   int ret;
 
   ret = ipforward_ipv6 ();
-  if (ret == 0)
-    {
-      vty_out (vty, "IP forwarding is already off%s", VTY_NEWLINE);
-      return CMD_ERR_NOTHING_TODO;
-    }
+  if (ret != 0)
+    ret = ipforward_ipv6_off ();
 
-  ret = ipforward_ipv6_off ();
   if (ret != 0)
     {
       vty_out (vty, "Can't turn off IPv6 forwarding%s", VTY_NEWLINE);