default to /etc/miniupnpd/miniupnpd.conf under linux

it is still /etc/miniupnpd.conf under BSD.

closes #695
This commit is contained in:
Thomas Bernard 2024-01-17 00:49:32 +01:00
parent 604ca0b82a
commit 4b0ff229d8
No known key found for this signature in database
GPG Key ID: DB511043A31ACAAF
5 changed files with 21 additions and 11 deletions

View File

@ -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)

View File

@ -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)

11
miniupnpd/configure vendored
View File

@ -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}

View File

@ -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.

View File

@ -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;