* 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>
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);
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);
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);
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);