diff options
author | hasso <hasso> | 2004-10-13 14:20:35 +0200 |
---|---|---|
committer | hasso <hasso> | 2004-10-13 14:20:35 +0200 |
commit | b71f00f23b0b39e50161c9f3d672cf242dd8202e (patch) | |
tree | 07f572971db0083f6f593a889cf06fd91211bcbc /zebra | |
parent | Make initializing smux connection configurable - "smux peer OID" command (diff) | |
download | frr-b71f00f23b0b39e50161c9f3d672cf242dd8202e.tar.xz frr-b71f00f23b0b39e50161c9f3d672cf242dd8202e.zip |
* zserv.c: Remove useless warnings "forwarding is already on".
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/ChangeLog | 1 | ||||
-rw-r--r-- | zebra/zserv.c | 34 |
2 files changed, 9 insertions, 26 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog index 081cffe3d..1284ede0e 100644 --- a/zebra/ChangeLog +++ b/zebra/ChangeLog @@ -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> diff --git a/zebra/zserv.c b/zebra/zserv.c index 5a0272d23..bb7937d1b 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -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); |