diff options
author | Christiano F. Haesbaert <haesbaert@cvs.openbsd.org> | 2012-04-30 13:53:02 +0000 |
---|---|---|
committer | Christiano F. Haesbaert <haesbaert@cvs.openbsd.org> | 2012-04-30 13:53:02 +0000 |
commit | b1705fe049a696e5d987fa909a5ea089bf937eb4 (patch) | |
tree | 43af77c3925fe3909da318fdd933d79ca979d6c5 /usr.sbin | |
parent | 0096e084a858467c2251be9590ec7ea3d12028dd (diff) |
Check for nat_range_high before creating the PF nat rule.
From Lawrence Teo.
ok camield, myself, mikeb.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ftp-proxy/filter.c | 4 |
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); } |