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