diff options
author | claudio <claudio@openbsd.org> | 2010-01-13 01:07:34 +0000 |
---|---|---|
committer | claudio <claudio@openbsd.org> | 2010-01-13 01:07:34 +0000 |
commit | 8ff1711025e523988a172548436fed3004d91f99 (patch) | |
tree | 378ae4caeee506e4c4ab763c2e7b40fa17019476 /usr.sbin/ftp-proxy | |
parent | In some cases the netmask gets set to a full 128 bit mask even if no (diff) | |
download | wireguard-openbsd-8ff1711025e523988a172548436fed3004d91f99.tar.xz wireguard-openbsd-8ff1711025e523988a172548436fed3004d91f99.zip |
pfr.rule.*.addr.type must be initialized to PF_ADDR_NONE for things that
are not used. bzero() of the rule structure is not enough.
Find with dlg@, OK mcbride@
Diffstat (limited to 'usr.sbin/ftp-proxy')
-rw-r--r-- | usr.sbin/ftp-proxy/filter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ftp-proxy/filter.c b/usr.sbin/ftp-proxy/filter.c index 49fe6b6d7ef..2112822a8d8 100644 --- a/usr.sbin/ftp-proxy/filter.c +++ b/usr.sbin/ftp-proxy/filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: filter.c,v 1.12 2010/01/12 03:20:51 mcbride Exp $ */ +/* $OpenBSD: filter.c,v 1.13 2010/01/13 01:07:34 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl> @@ -205,6 +205,9 @@ prepare_rule(u_int32_t id, struct sockaddr *src, pfr.rule.proto = IPPROTO_TCP; pfr.rule.src.addr.type = PF_ADDR_ADDRMASK; pfr.rule.dst.addr.type = PF_ADDR_ADDRMASK; + pfr.rule.nat.addr.type = PF_ADDR_NONE; + pfr.rule.rdr.addr.type = PF_ADDR_NONE; + if (src->sa_family == AF_INET) { memcpy(&pfr.rule.src.addr.v.a.addr.v4, &satosin(src)->sin_addr.s_addr, 4); |