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