summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_main.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2008-05-29 20:29:16 +0200
committerPaul Jakma <paul.jakma@sun.com>2008-05-29 20:29:16 +0200
commit0d6b2ee249e9efba30da3236c413bf03c7b27ed9 (patch)
tree4d9320f2c34f0c127b58b92f59e2c2afd2d5818f /ospf6d/ospf6_main.c
parent[zebra/linux] Use BPF to filter out responses, to try avoid netlink overruns (diff)
downloadfrr-0d6b2ee249e9efba30da3236c413bf03c7b27ed9.tar.xz
frr-0d6b2ee249e9efba30da3236c413bf03c7b27ed9.zip
[daemons] Sanity check port number arguments before use
2008-05-29 Martin Nagy <mnagy@redhat.com> * */*main.c: Sanity check port numbers before using.
Diffstat (limited to 'ospf6d/ospf6_main.c')
-rw-r--r--ospf6d/ospf6_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c
index 8380bc89b..680f4b7fa 100644
--- a/ospf6d/ospf6_main.c
+++ b/ospf6d/ospf6_main.c
@@ -227,7 +227,8 @@ main (int argc, char *argv[], char *envp[])
break;
}
vty_port = atoi (optarg);
- vty_port = (vty_port ? vty_port : OSPF6_VTY_PORT);
+ if (vty_port <= 0 || vty_port > 0xffff)
+ vty_port = OSPF6_VTY_PORT;
break;
case 'u':
ospf6d_privs.user = optarg;