From 4fc4e7ab47fef3295d0ae40e064fc99478c24e23 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 22 Jan 2003 19:47:09 +0000 Subject: Matthew Grant [zebra 17290] [PATCHES] - Fixes for problems in 0.93b portfix patch --- ripd/rip_main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ripd') diff --git a/ripd/rip_main.c b/ripd/rip_main.c index 1070fb45..5e560524 100644 --- a/ripd/rip_main.c +++ b/ripd/rip_main.c @@ -211,7 +211,15 @@ main (int argc, char **argv) pid_file = optarg; break; case 'P': - vty_port = atoi (optarg); + /* Deal with atoi() returning 0 on failure, and ripd not + listening on rip port... */ + if (strcmp(optarg, "0") == 0) + { + vty_port = 0; + break; + } + vty_port = atoi (optarg); + vty_port = (vty_port ? vty_port : RIP_VTY_PORT); break; case 'r': retain_mode = 1; -- cgit v1.2.1