summaryrefslogtreecommitdiff
path: root/ripd
diff options
context:
space:
mode:
authorpaul <paul>2003-01-22 19:47:09 +0000
committerpaul <paul>2003-01-22 19:47:09 +0000
commit4fc4e7ab47fef3295d0ae40e064fc99478c24e23 (patch)
tree82e0d2dd400ca4bf14138ac484120085244d2d25 /ripd
parentd753e9eec96f03aa02a7648e4279c524c376908d (diff)
Matthew Grant <grantma@anathoth.gen.nz>
[zebra 17290] [PATCHES] - Fixes for problems in 0.93b portfix patch
Diffstat (limited to 'ripd')
-rw-r--r--ripd/rip_main.c10
1 files changed, 9 insertions, 1 deletions
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;