summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ftp-proxy
diff options
context:
space:
mode:
authorhaesbaert <haesbaert@openbsd.org>2012-04-30 13:53:01 +0000
committerhaesbaert <haesbaert@openbsd.org>2012-04-30 13:53:01 +0000
commit6194c08942002ede00db55fcb24b5193636f19c8 (patch)
tree1b9459ba5156334ec6a9ff4b66ee97d47fff4b2f /usr.sbin/ftp-proxy
parentAdd a -s flag to ftp(1) to let the user specify the source IP address (diff)
downloadwireguard-openbsd-6194c08942002ede00db55fcb24b5193636f19c8.tar.xz
wireguard-openbsd-6194c08942002ede00db55fcb24b5193636f19c8.zip
Check for nat_range_high before creating the PF nat rule.
From Lawrence Teo. ok camield, myself, mikeb.
Diffstat (limited to 'usr.sbin/ftp-proxy')
-rw-r--r--usr.sbin/ftp-proxy/filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ftp-proxy/filter.c b/usr.sbin/ftp-proxy/filter.c
index ff355bdc06f..7d354cfaef6 100644
--- a/usr.sbin/ftp-proxy/filter.c
+++ b/usr.sbin/ftp-proxy/filter.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: filter.c,v 1.17 2012/03/06 12:50:20 mikeb Exp $ */
+/* $OpenBSD: filter.c,v 1.18 2012/04/30 13:53:01 haesbaert Exp $ */
/*
* Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl>
@@ -71,7 +71,7 @@ add_nat(u_int32_t id, struct sockaddr *src, int s_rd, struct sockaddr *dst,
u_int16_t nat_range_high)
{
if (!src || !dst || !d_port || !nat || !nat_range_low ||
- (src->sa_family != nat->sa_family)) {
+ !nat_range_high || (src->sa_family != nat->sa_family)) {
errno = EINVAL;
return (-1);
}