miniupnpd/pf: disabled setting dst address in rule by default
see #433
was introduced by 53e8185725
to fix #231
This commit is contained in:
parent
a774830fe0
commit
3f04f7992c
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue