summaryrefslogtreecommitdiff
path: root/relay
diff options
context:
space:
mode:
authorShawn Routhier <sar@isc.org>2009-01-06 00:32:19 +0000
committerShawn Routhier <sar@isc.org>2009-01-06 00:32:19 +0000
commit59112e84f5b1705578ae7dd71f1a2120ffd0313d (patch)
treeb9ed496a838e9e0c482d913ed6f52019f776bb45 /relay
parent113e193fbc4b8312fbee3f9efddab70056d5bfff (diff)
downloadisc-dhcp-59112e84f5b1705578ae7dd71f1a2120ffd0313d.tar.gz
Validate argument to port option - bug 18695
Diffstat (limited to 'relay')
-rw-r--r--relay/dhcrelay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c
index 93bfb4ed..e585c900 100644
--- a/relay/dhcrelay.c
+++ b/relay/dhcrelay.c
@@ -222,7 +222,7 @@ main(int argc, char **argv) {
} else if (!strcmp(argv[i], "-p")) {
if (++i == argc)
usage();
- local_port = htons(atoi (argv[i]));
+ local_port = validate_port(argv[i]);
log_debug("binding to user-specified port %d",
ntohs(local_port));
} else if (!strcmp(argv[i], "-c")) {