diff --git a/miniupnpd/Changelog.txt b/miniupnpd/Changelog.txt index 553b198..02bd655 100644 --- a/miniupnpd/Changelog.txt +++ b/miniupnpd/Changelog.txt @@ -1,4 +1,7 @@ -$Id: Changelog.txt,v 1.459 2020/04/09 18:06:17 nanard Exp $ +$Id: Changelog.txt,v 1.460 2020/04/12 17:27:31 nanard Exp $ + +2020/04/12: + pf: disabled setting dst address in rule by default 2020/04/09: Option to disable IPv6 at runtime : -4 / ipv6_disable=yes diff --git a/miniupnpd/genconfig.sh b/miniupnpd/genconfig.sh index b5e85c1..6f77c72 100755 --- a/miniupnpd/genconfig.sh +++ b/miniupnpd/genconfig.sh @@ -1,5 +1,5 @@ #! /bin/sh -# $Id: genconfig.sh,v 1.103 2019/10/03 20:40:39 nanard Exp $ +# $Id: genconfig.sh,v 1.107 2020/04/12 17:27:33 nanard Exp $ # vim: tabstop=4 shiftwidth=4 noexpandtab # # miniupnp daemon @@ -501,6 +501,12 @@ echo " * filter rules with pf */" >> ${CONFIGFILE} echo "/*#define PF_ENABLE_FILTER_RULES*/">> ${CONFIGFILE} echo "" >> ${CONFIGFILE} +echo "/* Uncomment the following line to set dst address in rdr rules with pf." >> ${CONFIGFILE} +echo " * It is disabled by default because of" >> ${CONFIGFILE} +echo " * https://github.com/miniupnp/miniupnp/issues/433 */" >> ${CONFIGFILE} +echo "/*#define PF_SET_DST_ADDR*/">> ${CONFIGFILE} +echo "" >> ${CONFIGFILE} + echo "/* Uncomment the following line to enable caching of results of" >> ${CONFIGFILE} echo " * the getifstats() function */" >> ${CONFIGFILE} echo "/*#define ENABLE_GETIFSTATS_CACHING*/" >> ${CONFIGFILE} diff --git a/miniupnpd/pf/obsdrdr.c b/miniupnpd/pf/obsdrdr.c index 9538f8e..e6bbe52 100644 --- a/miniupnpd/pf/obsdrdr.c +++ b/miniupnpd/pf/obsdrdr.c @@ -1,8 +1,8 @@ -/* $Id: obsdrdr.c,v 1.90 2018/07/06 12:00:10 nanard Exp $ */ +/* $Id: obsdrdr.c,v 1.93 2020/04/12 17:29:56 nanard Exp $ */ /* vim: tabstop=4 shiftwidth=4 noexpandtab * MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ - * (c) 2006-2018 Thomas Bernard + * (c) 2006-2020 Thomas Bernard * This software is subject to the conditions detailed * in the LICENCE file provided within the distribution */ @@ -341,6 +341,9 @@ add_redirect_rule2(const char * ifname, pcr.rule.src.addr.v.a.mask.v4.s_addr = htonl(INADDR_NONE); #endif } +#ifdef PF_SET_DST_ADDR + /* set dst address + * see https://github.com/miniupnp/miniupnp/issues/231 */ if(use_ext_ip_addr && use_ext_ip_addr[0] != '\0') { #ifdef PFVAR_NEW_STYLE @@ -351,6 +354,7 @@ add_redirect_rule2(const char * ifname, pcr.rule.dst.addr.v.a.mask.v4.s_addr = htonl(INADDR_NONE); #endif } +#endif /* PF_SET_DST_ADDR */ #ifndef PF_NEWSTYLE pcr.rule.rpool.proxy_port[0] = iport; pcr.rule.rpool.proxy_port[1] = iport;