diff --git a/miniupnpd/Changelog.txt b/miniupnpd/Changelog.txt index 1584b69..9de5ec5 100644 --- a/miniupnpd/Changelog.txt +++ b/miniupnpd/Changelog.txt @@ -1,4 +1,8 @@ -$Id: Changelog.txt,v 1.509 2024/01/15 00:20:19 nanard Exp $ +$Id: Changelog.txt,v 1.510 2024/01/17 00:05:12 nanard Exp $ + +2024/01/17: + default path for miniupnpd.conf is /etc/miniupnpd/miniupnpd.conf + under linux 2024/01/15: fix SUBSCRIBE timeout compliance (should be >= 1800 seconds) diff --git a/miniupnpd/INSTALL b/miniupnpd/INSTALL index 1106509..e6a2768 100644 --- a/miniupnpd/INSTALL +++ b/miniupnpd/INSTALL @@ -1,5 +1,5 @@ MiniUPnP project. -(c) 2006-2022 Thomas Bernard +(c) 2006-2024 Thomas Bernard Homepage : http://miniupnp.free.fr/ Mirror: https://miniupnp.tuxfamily.org/ github: https://github.com/miniupnp/miniupnp @@ -126,8 +126,9 @@ https://miniupnp.tuxfamily.org/forum/viewtopic.php?p=4370 https://github.com/miniupnp/miniupnp/pull/114 =========================== Configuration ============================= -Edit the /etc/miniupnpd.conf file to set options. Almost all options are -also available through command line switches. +The configuration file is either installed to /etc/miniupnpd.conf (BSD) +or /etc/miniupnpd/miniupnpd.conf (Linux) +Almost all options are also available through command line switches. A basic configuration would set : ext_ifname : WAN network interface (interface connected to the internet) diff --git a/miniupnpd/configure b/miniupnpd/configure index 8714ab2..f3a9dcc 100755 --- a/miniupnpd/configure +++ b/miniupnpd/configure @@ -1,5 +1,5 @@ #! /bin/sh -# $Id: configure,v 1.124 2024/01/04 01:12:04 nanard Exp $ +# $Id: configure,v 1.125 2024/01/17 00:05:14 nanard Exp $ # vim: tabstop=4 shiftwidth=4 noexpandtab # # miniupnp daemon @@ -623,6 +623,12 @@ if [ "$FW" = "iptables" ] || [ "$FW" = "nftables" ] ; then fi fi +if [ "$MAKEFILE" = "Makefile.linux" ] || [ "$MAKEFILE" = "Makefile.linux_nft" ] || [ "$MAKEFILE" = "Makefile.macosx" ] ; then + DEFAULT_CONFIG=/etc/miniupnpd/miniupnpd.conf +else + DEFAULT_CONFIG=/etc/miniupnpd.conf +fi + if [ "$MAKEFILE" = "Makefile.bsd" ] || [ "$OS_NAME" = "Darwin" ] || [ "$OS_NAME" = "SunOS" ] ; then echo "FWNAME = $FW" > bsdmake.inc echo "SRCDIR = ${BASEDIR}" >> bsdmake.inc @@ -874,6 +880,9 @@ echo "/* disable reading and parsing of config file (miniupnpd.conf) */" >> ${CO echo "/*#define DISABLE_CONFIG_FILE*/" >> ${CONFIGFILE} echo "" >> ${CONFIGFILE} +echo "#define DEFAULT_CONFIG \"${DEFAULT_CONFIG}\"" >> ${CONFIGFILE} +echo "" >> ${CONFIGFILE} + echo "/* Uncomment the following line to configure all manufacturer infos through miniupnpd.conf */" >> ${CONFIGFILE} if [ -n "$VENDORCFG" ] ; then echo "#define ENABLE_MANUFACTURER_INFO_CONFIGURATION" >> ${CONFIGFILE} diff --git a/miniupnpd/miniupnpd.8 b/miniupnpd/miniupnpd.8 index 093e38c..6aeb4aa 100644 --- a/miniupnpd/miniupnpd.8 +++ b/miniupnpd/miniupnpd.8 @@ -18,7 +18,7 @@ clients on the LAN to ask for port redirections. .SH OPTIONS .TP .BI \-f " config_file" -load the config from file. default is /etc/miniupnpd.conf. +load the config from file. .TP .BI \-i " ext_ifname" interface used to connect to the internet. diff --git a/miniupnpd/miniupnpd.c b/miniupnpd/miniupnpd.c index b9c838f..77203d0 100644 --- a/miniupnpd/miniupnpd.c +++ b/miniupnpd/miniupnpd.c @@ -1,4 +1,4 @@ -/* $Id: miniupnpd.c,v 1.258 2024/01/15 00:17:41 nanard Exp $ */ +/* $Id: miniupnpd.c,v 1.259 2024/01/17 00:05:14 nanard Exp $ */ /* vim: tabstop=4 shiftwidth=4 noexpandtab * MiniUPnP project * http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/ @@ -101,10 +101,6 @@ void init_iptpinhole(void); #endif #endif -#ifndef DEFAULT_CONFIG -#define DEFAULT_CONFIG "/etc/miniupnpd.conf" -#endif - #ifdef USE_MINIUPNPDCTL struct ctlelem { int socket;