miniupnpd: Updated to 2.1

arm-ng
kille72 8 years ago
parent 19ff9ecc3e
commit ada935d2ca

@ -1,4 +1,6 @@
$Id: Changelog.txt,v 1.440 2018/05/03 08:27:41 nanard Exp $ $Id: Changelog.txt,v 1.441 2018/05/08 21:34:18 nanard Exp $
VERSION 2.1 : released on 2018/05/08
2018/05/02: 2018/05/02:
option to store remaining time in leasefile option to store remaining time in leasefile

@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# $Id: genconfig.sh,v 1.96 2018/05/03 08:27:40 nanard Exp $ # $Id: genconfig.sh,v 1.97 2018/05/08 21:27:56 nanard Exp $
# vim: tabstop=4 shiftwidth=4 noexpandtab # vim: tabstop=4 shiftwidth=4 noexpandtab
# #
# miniupnp daemon # miniupnp daemon
@ -164,7 +164,7 @@ case $OS_NAME in
OS_URL=http://www.openbsd.org/ OS_URL=http://www.openbsd.org/
V6SOCKETS_ARE_V6ONLY=`sysctl -n net.inet6.ip6.v6only` V6SOCKETS_ARE_V6ONLY=`sysctl -n net.inet6.ip6.v6only`
;; ;;
FreeBSD) FreeBSD | GNU/kFreeBSD)
VER=`grep '#define __FreeBSD_version' /usr/include/sys/param.h | awk '{print $3}'` VER=`grep '#define __FreeBSD_version' /usr/include/sys/param.h | awk '{print $3}'`
if [ $VER -ge 700049 ]; then if [ $VER -ge 700049 ]; then
echo "#define PFRULE_INOUT_COUNTS" >> ${CONFIGFILE} echo "#define PFRULE_INOUT_COUNTS" >> ${CONFIGFILE}

@ -1,4 +1,4 @@
/* $Id: miniupnpd.c,v 1.229 2018/05/03 08:27:42 nanard Exp $ */ /* $Id: miniupnpd.c,v 1.230 2018/05/08 21:28:28 nanard Exp $ */
/* vim: tabstop=4 shiftwidth=4 noexpandtab /* vim: tabstop=4 shiftwidth=4 noexpandtab
* MiniUPnP project * MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
@ -2081,6 +2081,18 @@ main(int argc, char * * argv)
tomato_helper(); tomato_helper();
#endif #endif
#ifdef ENABLE_PCP
if(GETFLAG(ENABLENATPMPMASK))
{
/* Send PCP startup announcements */
#ifdef ENABLE_IPV6
PCPSendUnsolicitedAnnounce(snatpmp, addr_count, spcp_v6);
#else /* IPv4 only */
PCPSendUnsolicitedAnnounce(snatpmp, addr_count);
#endif
}
#endif
/* main loop */ /* main loop */
while(!quitting) while(!quitting)
{ {

@ -1,4 +1,4 @@
/* $Id: pcpserver.c,v 1.47 2018/03/13 10:21:19 nanard Exp $ */ /* $Id: pcpserver.c,v 1.48 2018/05/08 21:28:28 nanard Exp $ */
/* MiniUPnP project /* MiniUPnP project
* Website : http://miniupnp.free.fr/ * Website : http://miniupnp.free.fr/
* Author : Peter Tatrai * Author : Peter Tatrai
@ -1637,9 +1637,9 @@ int OpenAndConfPCPv6Socket(void)
#endif /*ENABLE_IPV6*/ #endif /*ENABLE_IPV6*/
#ifdef ENABLE_IPV6 #ifdef ENABLE_IPV6
static void PCPSendUnsolicitedAnnounce(int * sockets, int n_sockets, int socket6) void PCPSendUnsolicitedAnnounce(int * sockets, int n_sockets, int socket6)
#else /* IPv4 only */ #else /* IPv4 only */
static void PCPSendUnsolicitedAnnounce(int * sockets, int n_sockets) void PCPSendUnsolicitedAnnounce(int * sockets, int n_sockets)
#endif #endif
{ {
int i; int i;

@ -1,4 +1,4 @@
/* $Id: pcpserver.h,v 1.5 2017/12/12 11:43:31 nanard Exp $ */ /* $Id: pcpserver.h,v 1.6 2018/05/08 21:28:28 nanard Exp $ */
/* MiniUPnP project /* MiniUPnP project
* Website : http://miniupnp.free.fr/ * Website : http://miniupnp.free.fr/
* Author : Peter Tatrai * Author : Peter Tatrai
@ -52,6 +52,14 @@ int ProcessIncomingPCPPacket(int s, unsigned char *msg_buff, int len,
*/ */
int OpenAndConfPCPv6Socket(void); int OpenAndConfPCPv6Socket(void);
/*
* Send Unsolicited ANNOUNCE Message
*/
#ifdef ENABLE_IPV6
void PCPSendUnsolicitedAnnounce(int * sockets, int n_sockets, int socket6);
#else /* IPv4 only */
void PCPSendUnsolicitedAnnounce(int * sockets, int n_sockets);
#endif
/* /*
* To be called when Public IP address changed (IPv4) * To be called when Public IP address changed (IPv4)

Loading…
Cancel
Save