Skip to content

Commit

Permalink
miniupnpd: bump to padavan-ng version 2.1(20180706)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanwckf committed Oct 10, 2018
1 parent 0970800 commit a70536e
Show file tree
Hide file tree
Showing 92 changed files with 6,903 additions and 432 deletions.
4 changes: 0 additions & 4 deletions trunk/user/miniupnpd/miniupnpd-2.x/.gitignore

This file was deleted.

47 changes: 43 additions & 4 deletions trunk/user/miniupnpd/miniupnpd-2.x/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
$Id: Changelog.txt,v 1.431 2017/04/21 11:30:23 nanard Exp $
$Id: Changelog.txt,v 1.442 2018/07/06 12:05:46 nanard Exp $

2018/07/06:
STUN support

VERSION 2.1 : released on 2018/05/08

2018/05/02:
option to store remaining time in leasefile

2018/04/12:
pf: set dst address in rule if use_ext_ip_addr is set

2018/04/06:
Add options for netfilter scripts

2018/03/13:
Use monotonic clock for timeouts, etc.

2018/02/22:
Add option force_igd_desc_v1 to force devices and services versions
to 1 in IGD v2 mode

2017/12/12:
Fix a few buffer overrun in SSDP and SOAP parsing

2017/11/02:
PCP : reset epoch after address change

2017/05/26:
merge https://github.com/miniupnp/miniupnp/tree/randomize_url branch

2017/05/24:
get SSDP packet receiving interface index and use it to check if the
packet is from a LAN

2017/03/13:
default to client address for AddPortMapping when <NewInternalClient>
Expand Down Expand Up @@ -80,11 +114,16 @@ VERSION 2.0 : released on 2016/04/19

2015/09/22:
cleanup UPNP_VERSION macro / add UPNP_VERSION_MAJOR, UPNP_VERSION_MINOR
Dont use packed structs anymore to read/write PCP messages
Don't use packed structs anymore to read/write PCP messages

2015/09/15:
use name server from query in SOAP responses

2015/09/14:
Randomize URLs to avoid http://www.filet-o-firewall.com/
https://github.com/filetofirewall/fof
(specific branch, merged later, see above)

2015/08/25:
better bind socket to right interface(s),
using struct ip_mreqn, SO_BINDTODEVICE
Expand Down Expand Up @@ -298,7 +337,7 @@ VERSION 1.8 : released on 2013/02/06

2013/02/06:
Check source address of incomining HTTP connections and SSDP
packets in order to filter out WAN SSDP and HTTP trafic.
packets in order to filter out WAN SSDP and HTTP traffic.
Implement get_src_for_route_to() for *BSD
fix 2 potential memory leaks in GetListOfPortMappings()

Expand Down Expand Up @@ -583,7 +622,7 @@ VERSION 1.6 : released the 2011/07/25
GET /DP.xml is now available. The description has to be completed.

2011/05/19:
Add getconnstatus.c/.h. Dont always have ConnectionStatus to "Connected"
Add getconnstatus.c/.h. Don't always have ConnectionStatus to "Connected"
Events for WANIPv6FirewallControll

2011/05/16:
Expand Down
34 changes: 24 additions & 10 deletions trunk/user/miniupnpd/miniupnpd-2.x/INSTALL
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
MiniUPnP project.
(c) 2006-2016 Thomas Bernard
(c) 2006-2017 Thomas Bernard
Homepage : http://miniupnp.free.fr/
Mirror: http://miniupnp.tuxfamily.org/
Mirror: https://miniupnp.tuxfamily.org/
github: https://github.com/miniupnp/miniupnp

miniupnpd is still under active developpement. This documentation is
miniupnpd is still under developpement. This documentation is
likely to be a little outdated when you read it. So please go on the
web forum http://miniupnp.tuxfamily.org/ if you need more information.
web forum https://miniupnp.tuxfamily.org/ if you need more information.

================================ *BSD/pf =================================
To Build and Install :
Expand All @@ -25,7 +25,7 @@ To Build and Install :
lines to /etc/pf.conf :
pass out on $int_if from any to 239.0.0.0/8 keep state
pass in on $int_if from any to 239.0.0.0/8 keep state
- dont forget to " pfctl -f /etc/pf.conf "
- don't forget to " pfctl -f /etc/pf.conf "
- you can check your modifications are taken into account with
"pfctl -s nat" and "pfctl -s rule". Look for the "rdr-anchor miniupnpd"
(if applicable) and/or "anchor miniupnpd" lines.
Expand Down Expand Up @@ -75,7 +75,7 @@ To Build and install :
from http://netfilter.org
- edit and run netfilter/iptables_init.sh shell script.
This script must allways be run before the daemon
to set up intial rules and chains.
to set up initial rules and chains.
- Build and edit the config.h file
> make -f Makefile.linux config.h
> vi config.h
Expand All @@ -90,8 +90,8 @@ To Build and install :
- anytime, you can use the netfilter/iptables_flush.sh
script to flush all rules added by the daemon.
- after killing the daemon, you can get back to
iptables initial state by runing the netfilter/iptables_removeall.sh
script. Don't forget to edit the script to your convinience.
iptables initial state by running the netfilter/iptables_removeall.sh
script. Don't forget to edit the script to your convenience.

NOTE: a /etc/init.d/miniupnpd script will be installed.
If it suits you, you can use is with start, stop or restart argument.
Expand All @@ -116,7 +116,7 @@ work is in progress. To build :
> make -f Makefile.linux_nft

see :
http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=4370
https://miniupnp.tuxfamily.org/forum/viewtopic.php?p=4370
https://github.com/miniupnp/miniupnp/pull/114

=========================== Configuration =============================
Expand All @@ -138,7 +138,7 @@ The current code assumes there is only one IPv4 address assigned to LAN
interfaces. That is not the case with some CARP setup, there is then a risk
the wrong mask would be picked. You can force the mask when using interface
names :
listtening_ip=eth0/24
listening_ip=eth0/24

Miniupnpd supports some kind of security check for allowing or disallowing
redirection to be made. The UPnP permission rules are read from the
Expand Down Expand Up @@ -179,3 +179,17 @@ To stop the daemon use :
# kill `cat /var/run/miniupnpd.pid`
or if your linux system use /etc/init.d/
# /etc/init.d/miniupnpd stop


* Signals :
miniupnpd handles the following signals :
SIGUSR1: Send public IP address change notification
SIGUSR2: Handle special actions in Tomato Firmware version
Or rewrite the lease_file
SIGINT: Close gracefully
SIGTERM: Close gracefully
SIGPIPE: Ignore

There is code to detect change in network interfaces bsd/ifacewatcher.c and
linux/ifacewatcher.c, but if that code doesn't work for you, you may want to
send SIGUSR1 to miniupnpd if you public IP address changed.
2 changes: 1 addition & 1 deletion trunk/user/miniupnpd/miniupnpd-2.x/LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MiniUPnPd
Copyright (c) 2006-2016, Thomas BERNARD
Copyright (c) 2006-2017, Thomas BERNARD
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
10 changes: 8 additions & 2 deletions trunk/user/miniupnpd/miniupnpd-2.x/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: Makefile,v 1.89 2017/04/21 11:28:42 nanard Exp $
# $Id: Makefile,v 1.91 2018/07/06 12:04:47 nanard Exp $
# MiniUPnP project
# http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
# Author: Thomas Bernard
Expand Down Expand Up @@ -101,6 +101,7 @@ STDOBJS = miniupnpd.o upnphttp.o upnpdescgen.o upnpsoap.o \
upnpredirect.o getifaddr.o daemonize.o upnpglobalvars.o \
options.o upnppermissions.o minissdp.o natpmp.o pcpserver.o \
upnpevents.o upnputils.o getconnstatus.o \
upnpstun.o \
upnppinhole.o asyncsendto.o portinuse.o
BSDOBJS = bsd/getifstats.o bsd/ifacewatcher.o bsd/getroute.o
SUNOSOBJS = solaris/getifstats.o bsd/ifacewatcher.o bsd/getroute.o
Expand Down Expand Up @@ -139,11 +140,13 @@ TESTGETIFADDROBJS = testgetifaddr.o getifaddr.o
MINIUPNPDCTLOBJS = miniupnpdctl.o
TESTASYNCSENDTOOBJS = testasyncsendto.o asyncsendto.o upnputils.o bsd/getroute.o
TESTPORTINUSEOBJS = testportinuse.o portinuse.o getifaddr.o
TESTMINISSDPOBJS = testminissdp.o minissdp.o upnputils.o upnpglobalvars.o \
asyncsendto.o bsd/getroute.o

EXECUTABLES = miniupnpd testupnpdescgen testgetifstats \
testupnppermissions miniupnpdctl \
testgetifaddr testgetroute testasyncsendto \
testportinuse testssdppktgen
testportinuse testssdppktgen testminissdp

.if $(OSNAME) == "Darwin"
LIBS =
Expand Down Expand Up @@ -252,6 +255,9 @@ testasyncsendto: config.h $(TESTASYNCSENDTOOBJS)
testportinuse: config.h $(TESTPORTINUSEOBJS)
$(CC) $(LDFLAGS) -o $@ $(TESTPORTINUSEOBJS) $(LIBS)

testminissdp: config.h $(TESTMINISSDPOBJS)
$(CC) $(LDFLAGS) -o $@ $(TESTMINISSDPOBJS) $(LIBS)

# gmake :
# $(CC) $(CFLAGS) -o $@ $^
# BSDmake :
Expand Down
21 changes: 15 additions & 6 deletions trunk/user/miniupnpd/miniupnpd-2.x/Makefile.linux
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# $Id: Makefile.linux,v 1.94 2016/04/18 09:06:42 nanard Exp $
# $Id: Makefile.linux,v 1.97 2018/07/06 12:04:48 nanard Exp $
# MiniUPnP project
# (c) 2006-2015 Thomas Bernard
# (c) 2006-2017 Thomas Bernard
# http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
# Author : Thomas Bernard
# for use with GNU Make
Expand Down Expand Up @@ -63,6 +63,7 @@ BASEOBJS = miniupnpd.o upnphttp.o upnpdescgen.o upnpsoap.o \
upnpredirect.o getifaddr.o daemonize.o upnpglobalvars.o \
options.o upnppermissions.o minissdp.o natpmp.o pcpserver.o \
upnpevents.o upnputils.o getconnstatus.o \
upnpstun.o \
upnppinhole.o pcplearndscp.o asyncsendto.o

LNXOBJS = linux/getifstats.o linux/ifacewatcher.o
Expand Down Expand Up @@ -94,6 +95,7 @@ clean:
install: miniupnpd miniupnpd.8 miniupnpd.conf genuuid \
netfilter/iptables_init.sh netfilter/iptables_removeall.sh \
netfilter/ip6tables_init.sh netfilter/ip6tables_removeall.sh \
netfilter/miniupnpd_functions.sh \
linux/miniupnpd.init.d.script
$(STRIP) miniupnpd
$(INSTALL) -d $(DESTDIR)$(SBININSTALLDIR)
Expand All @@ -103,6 +105,7 @@ install: miniupnpd miniupnpd.8 miniupnpd.conf genuuid \
$(INSTALL) netfilter/iptables_removeall.sh $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) netfilter/ip6tables_init.sh $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) netfilter/ip6tables_removeall.sh $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) netfilter/miniupnpd_functions.sh $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) --mode=0644 -b miniupnpd.conf $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) -d $(DESTDIR)$(PREFIX)/etc/init.d
$(INSTALL) linux/miniupnpd.init.d.script $(DESTDIR)$(PREFIX)/etc/init.d/miniupnpd
Expand Down Expand Up @@ -154,6 +157,10 @@ testasyncsendto: testasyncsendto.o asyncsendto.o upnputils.o \
testportinuse: testportinuse.o portinuse.o getifaddr.o \
netfilter/iptcrdr.o

testminissdp: testminissdp.o minissdp.o upnputils.o upnpglobalvars.o \
asyncsendto.o linux/getroute.o


miniupnpdctl: miniupnpdctl.o

config.h: genconfig.sh VERSION
Expand All @@ -174,7 +181,8 @@ miniupnpd.o: getifaddr.h upnpsoap.h options.h minissdp.h upnpredirect.h
miniupnpd.o: upnppinhole.h daemonize.h upnpevents.h asyncsendto.h natpmp.h
miniupnpd.o: pcpserver.h commonrdr.h upnputils.h ifacewatcher.h
upnphttp.o: config.h upnphttp.h upnpdescgen.h miniupnpdpath.h upnpsoap.h
upnphttp.o: upnpevents.h upnputils.h
upnphttp.o: upnpevents.h upnputils.h upnpglobalvars.h upnppermissions.h
upnphttp.o: miniupnpdtypes.h
upnpdescgen.o: config.h getifaddr.h upnpredirect.h upnpdescgen.h
upnpdescgen.o: miniupnpdpath.h upnpglobalvars.h upnppermissions.h
upnpdescgen.o: miniupnpdtypes.h upnpdescstrings.h upnpurns.h getconnstatus.h
Expand All @@ -199,7 +207,7 @@ options.o: miniupnpdtypes.h
upnppermissions.o: config.h upnppermissions.h
minissdp.o: config.h upnpdescstrings.h miniupnpdpath.h upnphttp.h
minissdp.o: upnpglobalvars.h upnppermissions.h miniupnpdtypes.h minissdp.h
minissdp.o: upnputils.h getroute.h asyncsendto.h codelength.h
minissdp.o: upnputils.h getroute.h asyncsendto.h codelength.h macros.h
natpmp.o: macros.h config.h natpmp.h upnpglobalvars.h upnppermissions.h
natpmp.o: miniupnpdtypes.h getifaddr.h upnpredirect.h commonrdr.h upnputils.h
natpmp.o: portinuse.h asyncsendto.h
Expand All @@ -213,11 +221,11 @@ upnputils.o: config.h upnputils.h upnpglobalvars.h upnppermissions.h
upnputils.o: miniupnpdtypes.h getroute.h
getconnstatus.o: getconnstatus.h getifaddr.h
upnppinhole.o: macros.h config.h upnpredirect.h upnpglobalvars.h
upnppinhole.o: upnppermissions.h miniupnpdtypes.h upnpevents.h
upnppinhole.o: upnppermissions.h miniupnpdtypes.h upnpevents.h upnppinhole.h
upnppinhole.o: netfilter/iptpinhole.h
pcplearndscp.o: config.h upnpglobalvars.h upnppermissions.h miniupnpdtypes.h
pcplearndscp.o: pcplearndscp.h
asyncsendto.o: asyncsendto.h
asyncsendto.o: asyncsendto.h upnputils.h
linux/getifstats.o: config.h getifstats.h
linux/ifacewatcher.o: config.h ifacewatcher.h config.h minissdp.h
linux/ifacewatcher.o: miniupnpdtypes.h getifaddr.h upnpglobalvars.h
Expand All @@ -242,3 +250,4 @@ testasyncsendto.o: miniupnpdtypes.h config.h upnputils.h asyncsendto.h
testportinuse.o: macros.h config.h portinuse.h
miniupnpdctl.o: macros.h
testssdppktgen.o: macros.h config.h miniupnpdpath.h upnphttp.h
upnpstun.o: config.h upnpstun.h netfilter/iptcrdr.h
6 changes: 5 additions & 1 deletion trunk/user/miniupnpd/miniupnpd-2.x/Makefile.linux_nft
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CFLAGS = -O -g #-DDEBUG
CFLAGS ?= -Os
CFLAGS += -fno-strict-aliasing
CFLAGS += -fno-common
CPPFLAGS += -D_GNU_SOURCE
CPPFLAGS += -D_GNU_SOURCE
CFLAGS += -Wall
CFLAGS += -Wextra -Wstrict-prototypes -Wdeclaration-after-statement
#CFLAGS += -Wno-missing-field-initializers
Expand All @@ -42,6 +42,7 @@ BASEOBJS = miniupnpd.o upnphttp.o upnpdescgen.o upnpsoap.o \
upnpredirect.o getifaddr.o daemonize.o upnpglobalvars.o \
options.o upnppermissions.o minissdp.o natpmp.o pcpserver.o \
upnpevents.o upnputils.o getconnstatus.o \
upnpstun.o \
upnppinhole.o pcplearndscp.o asyncsendto.o

LNXOBJS = linux/getifstats.o linux/ifacewatcher.o linux/getroute.o
Expand Down Expand Up @@ -96,6 +97,7 @@ clean:
install: miniupnpd miniupnpd.8 miniupnpd.conf genuuid \
netfilter/iptables_init.sh netfilter/iptables_removeall.sh \
netfilter/ip6tables_init.sh netfilter/ip6tables_removeall.sh \
netfilter/miniupnpd_functions.sh \
linux/miniupnpd.init.d.script
$(STRIP) miniupnpd
$(INSTALL) -d $(DESTDIR)$(SBININSTALLDIR)
Expand All @@ -105,6 +107,7 @@ install: miniupnpd miniupnpd.8 miniupnpd.conf genuuid \
$(INSTALL) netfilter/iptables_removeall.sh $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) netfilter/ip6tables_init.sh $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) netfilter/ip6tables_removeall.sh $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) netfilter/miniupnpd_functions.sh $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) --mode=0644 -b miniupnpd.conf $(DESTDIR)$(ETCINSTALLDIR)
$(INSTALL) -d $(DESTDIR)$(PREFIX)/etc/init.d
$(INSTALL) linux/miniupnpd.init.d.script $(DESTDIR)$(PREFIX)/etc/init.d/miniupnpd
Expand Down Expand Up @@ -227,3 +230,4 @@ testgetroute.o: config.h miniupnpdtypes.h
testasyncsendto.o: miniupnpdtypes.h config.h upnputils.h asyncsendto.h
testportinuse.o: macros.h config.h portinuse.h
miniupnpdctl.o: macros.h
upnpstun.o: config.h upnpstun.h netfilter/iptcrdr.h
Loading

0 comments on commit a70536e

Please sign in to comment.