diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2017-08-28 06:00:06 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2017-08-28 06:00:06 +0000 |
commit | 6e125a719ea91234184421b02fcd6a2cd1f80e16 (patch) | |
tree | 6cc16dbad46ebb4565cfbaaead8b2786183d57b9 /usr.sbin | |
parent | 4a9fce5e0080c827e3cc28451398b6af38926c6c (diff) |
65535 is a valid port to listen on.
Off-by-one pointed out by and diff from Kris Katterjohn katterjohn AT
gmail, thanks!
chris@ pointed out that more than httpd(8) is effected.
OK gilles@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/httpd/parse.y | 4 | ||||
-rw-r--r-- | usr.sbin/ldapd/parse.y | 4 | ||||
-rw-r--r-- | usr.sbin/relayd/parse.y | 4 | ||||
-rw-r--r-- | usr.sbin/smtpd/parse.y | 4 | ||||
-rw-r--r-- | usr.sbin/switchd/parse.y | 4 | ||||
-rw-r--r-- | usr.sbin/ypldap/parse.y | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y index 203ddd1b0bb..fcf1938c42d 100644 --- a/usr.sbin/httpd/parse.y +++ b/usr.sbin/httpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.91 2017/08/11 18:48:56 jsing Exp $ */ +/* $OpenBSD: parse.y,v 1.92 2017/08/28 06:00:05 florian Exp $ */ /* * Copyright (c) 2007 - 2015 Reyk Floeter <reyk@openbsd.org> @@ -1118,7 +1118,7 @@ medianamesl : numberstring { ; port : PORT NUMBER { - if ($2 <= 0 || $2 >= (int)USHRT_MAX) { + if ($2 <= 0 || $2 > (int)USHRT_MAX) { yyerror("invalid port: %lld", $2); YYERROR; } diff --git a/usr.sbin/ldapd/parse.y b/usr.sbin/ldapd/parse.y index 0ef43f484bb..a945dc32b43 100644 --- a/usr.sbin/ldapd/parse.y +++ b/usr.sbin/ldapd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.24 2017/04/06 12:22:32 gsoares Exp $ */ +/* $OpenBSD: parse.y,v 1.25 2017/08/28 06:00:05 florian Exp $ */ /* * Copyright (c) 2009, 2010 Martin Hedenfalk <martinh@openbsd.org> @@ -161,7 +161,7 @@ port : PORT STRING { free($2); } | PORT NUMBER { - if ($2 <= 0 || $2 >= (int)USHRT_MAX) { + if ($2 <= 0 || $2 > (int)USHRT_MAX) { yyerror("invalid port: %lld", $2); YYERROR; } diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y index 5e318601f26..5e357bb7eb2 100644 --- a/usr.sbin/relayd/parse.y +++ b/usr.sbin/relayd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.215 2017/05/27 08:33:25 claudio Exp $ */ +/* $OpenBSD: parse.y,v 1.216 2017/08/28 06:00:05 florian Exp $ */ /* * Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -338,7 +338,7 @@ port : PORT STRING { free($2); } | PORT NUMBER { - if ($2 <= 0 || $2 >= (int)USHRT_MAX) { + if ($2 <= 0 || $2 > (int)USHRT_MAX) { yyerror("invalid port: %d", $2); YYERROR; } diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y index b522d402460..df6b34402f2 100644 --- a/usr.sbin/smtpd/parse.y +++ b/usr.sbin/smtpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.197 2017/07/11 06:08:40 natano Exp $ */ +/* $OpenBSD: parse.y,v 1.198 2017/08/28 06:00:05 florian Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -480,7 +480,7 @@ opt_if_listen : INET4 { } listen_opts.options |= LO_PORT; - if ($2 <= 0 || $2 >= (int)USHRT_MAX) { + if ($2 <= 0 || $2 > (int)USHRT_MAX) { yyerror("invalid port: %" PRId64, $2); YYERROR; } diff --git a/usr.sbin/switchd/parse.y b/usr.sbin/switchd/parse.y index 33169efb1fe..52bad178e8f 100644 --- a/usr.sbin/switchd/parse.y +++ b/usr.sbin/switchd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.5 2017/08/06 17:31:19 rob Exp $ */ +/* $OpenBSD: parse.y,v 1.6 2017/08/28 06:00:05 florian Exp $ */ /* * Copyright (c) 2007-2016 Reyk Floeter <reyk@openbsd.org> @@ -144,7 +144,7 @@ listen : LISTEN ON STRING opttls port { ; port : PORT NUMBER { - if ($2 <= 0 || $2 >= (int)USHRT_MAX) { + if ($2 <= 0 || $2 > (int)USHRT_MAX) { yyerror("invalid port: %lld", $2); YYERROR; } diff --git a/usr.sbin/ypldap/parse.y b/usr.sbin/ypldap/parse.y index 9dc32c8f544..afe56971092 100644 --- a/usr.sbin/ypldap/parse.y +++ b/usr.sbin/ypldap/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.22 2017/05/30 09:33:31 jmatthew Exp $ */ +/* $OpenBSD: parse.y,v 1.23 2017/08/28 06:00:05 florian Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -171,7 +171,7 @@ port : PORT STRING { free($2); } | PORT NUMBER { - if ($2 <= 0 || $2 >= (int)USHRT_MAX) { + if ($2 <= 0 || $2 > (int)USHRT_MAX) { yyerror("invalid port: %lld", $2); YYERROR; } |