summaryrefslogtreecommitdiff
path: root/ripngd
diff options
context:
space:
mode:
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripng_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c
index 70553910..a18ce9de 100644
--- a/ripngd/ripng_main.c
+++ b/ripngd/ripng_main.c
@@ -240,7 +240,8 @@ main (int argc, char **argv)
break;
}
vty_port = atoi (optarg);
- vty_port = (vty_port ? vty_port : RIPNG_VTY_PORT);
+ if (vty_port <= 0 || vty_port > 0xffff)
+ vty_port = RIPNG_VTY_PORT;
break;
case 'r':
retain_mode = 1;