summaryrefslogtreecommitdiff
path: root/ospfd/ospf_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_main.c')
-rw-r--r--ospfd/ospf_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c
index 27a12dd0..1a200a8f 100644
--- a/ospfd/ospf_main.c
+++ b/ospfd/ospf_main.c
@@ -245,7 +245,8 @@ main (int argc, char **argv)
break;
}
vty_port = atoi (optarg);
- vty_port = (vty_port ? vty_port : OSPF_VTY_PORT);
+ if (vty_port <= 0 || vty_port > 0xffff)
+ vty_port = OSPF_VTY_PORT;
break;
case 'u':
ospfd_privs.user = optarg;