124 Commits

Author SHA1 Message Date
Thomas Bernard
a1ceec3dba
miniupnpd: Allow to use two different network interfaces for IPv4 and IPv6 internet
-i / -I
ext_ifname= / ext_ifname6=

see :
df906367be/
thanks to "sfstudio"
2019-05-21 10:42:40 +02:00
Thomas Bernard
510a6e9630
fix check of valid HTTPS socket 2019-01-23 09:25:10 +01:00
Thomas Bernard
efe5d87103 LOG_WARNING if behind restrictive NAT 2018-07-06 14:41:04 +02:00
Pali Rohár
e6011dc534 miniupnpd: Allow to specify also port number in -o STUN: option
Also update help for -o STUN: option, it can take stun hostname too.
2018-07-06 14:38:37 +02:00
Thomas Bernard
810cb665c2 Merge branch 'pr_307'
see #307
2018-07-06 13:40:18 +02:00
Thomas Bernard
15b6f3e9c2 fixes in update_ext_ip_addr_from_stun()
Signed-off-by: Thomas Bernard <miniupnp@free.fr>
2018-07-06 13:29:33 +02:00
Thomas Bernard
8bc6d6f556 PERFORMSTUN => PERFORMSTUNMASK. allow to specify stun using -o option 2018-07-06 13:23:22 +02:00
Thomas Bernard
ef179a45e3 do not check empty string with strlen(s) == 0
see #292
2018-06-01 10:55:45 +02:00
Pali Rohár
8c97654d70 miniupnpd: When enabled perform STUN to learn external IP address and NAT type
Also enable port forwarding when direct (non-NAT) connection or unrestricted NAT 1:1 (without any filtering) is detected.
2018-05-19 13:32:42 +02:00
Pali Rohár
8e10a1aeab miniupnpd: Disable port forwarding when we are behind restrictive nat with reserved / private IP address
In this case port forwarding is impossible, so rather return error code to the client instead of silently trying to do something and informing clients that port forwarding is enabled.
2018-05-19 13:32:04 +02:00
Pali Rohár
cce19781e6 miniupnpd: Add validation that public ip address is not reserved and is really public
This ensures that all requests for getting public IP address (either via UPnP IGD or PCP/PMP) would contain correct public IP address or an error (instead of some invalid private/reserved IP address).
2018-05-19 13:31:26 +02:00
Thomas Bernard
e11bbf0bc0
miniupnpd/pcp: Send PCP announcment at startup
fixes #254
2018-05-08 23:06:19 +02:00
Thomas Bernard
a92138345b add option LEASEFILE_USE_REMAINING_TIME
new function lease_file_rewrite()
that is called just before exiting, and when SIGUSR2 is received
see #295
2018-05-02 09:40:12 +02:00
Thomas Bernard
1fe8d21cf2 fixes #272 2018-04-12 10:49:53 +02:00
Thomas Bernard
eaaf4f10ae miniupnpd: introduce upnp_gettimeofday() which is monotonic :)
fixes #288
2018-04-12 10:07:11 +02:00
Thomas Bernard
dd2aa84204 miniupnpd: use monotonic clock for timeouts, etc.
fixes #288

also changed set_startup_time()
2018-03-13 11:43:07 +01:00
Thomas Bernard
f0511d761b miniupnpd: Add -1 option
fixes #277
see #282
2018-02-22 14:02:52 +01:00
Thomas Bernard
80779ff4f7 Fix commit 6cbf0ba
Use the "flags" global variable to store the option value
Save a lot of complexity.
2018-02-22 13:47:48 +01:00
Nye Liu
c6bf0ba6f3 Allow runtime override of igd to v1 for people running binaries with v2 enabled
Towards miniupnp/miniupnp#277
2018-02-19 22:14:05 -08:00
Thomas Bernard
7492fe42c2 pcpserver.c: send ANNOUNCE when IP changed
see #254
2017-11-27 23:04:51 +01:00
Thomas Bernard
6ce6a70973 PCP : reset epoch after address change
see #254
2017-11-02 17:27:24 +01:00
Thomas Bernard
5923d5de6f => 2017 2017-05-27 10:25:53 +02:00
Thomas Bernard
11fcf5a008 Merge branch 'master' into randomize_url 2017-05-26 17:30:18 +02:00
Thomas Bernard
50d21a38d0 SSDP: use receiving interface index to check if from LAN 2017-05-25 00:44:29 +02:00
Thomas Bernard
57a74f2739 Merge branch 'master' into randomize_url 2017-04-21 11:33:25 +02:00
Thomas Bernard
2c77721888 do not split conditional statement #184
closes #184
2016-12-28 11:58:21 +01:00
Thomas Bernard
32855b854c dot not try to find IPv6 address if IPv6 is disabled
see #49
2016-12-16 09:39:19 +01:00
Thomas Bernard
2a1cc8d798 do not try to call OpenAndConfPCPv6Socket() when IPv6 is off
see #49
2016-12-16 09:32:41 +01:00
Thomas Bernard
144eeefd19 Merge branch 'master' into randomize_url
Conflicts:
	miniupnpd/genconfig.sh
	miniupnpd/testupnpdescgen.c
	miniupnpd/upnpdescgen.c
	miniupnpd/upnpglobalvars.c
	miniupnpd/upnpglobalvars.h
2016-11-11 18:01:35 +01:00
Thomas Bernard
1579f4a2af 2015 => 2016 2016-10-07 11:16:03 +02:00
Thomas Bernard
9a5eaaa767 remove extra curly brace in tomato_load()
fixes #195 which was introduced in 6532b02caba72b590392d4ef85165512df20161d
2016-04-24 22:20:14 +02:00
Thomas Bernard
6532b02cab Fix tomato_load() leaseduration
fixes #192
2016-03-04 19:33:18 +01:00
Thomas Bernard
d3635faeed add upnp_nat_postrouting_chain .conf option
fixes #190

MINIUPNPD-PCP-PEER has also been renamed to MINIUPNPD-POSTROUTING
( 1ba4362910a071919682fd78a88a9530c27548eb )
2016-01-26 16:59:04 +01:00
Chocobo1
e405f78b89 Fix output specifier 2016-01-04 12:13:00 +08:00
Thomas Bernard
e076899a37 buffer overflow fix
in MULTIPLE_EXTERNAL_IP code which is not used normally...
2015-12-31 00:41:24 +01:00
Thomas Bernard
1ab8cf0a22 improve syslog message for incoming HTTP requests 2015-12-16 11:26:03 +01:00
Thomas Bernard
4afc6fcf7f fix : properly call find_ipv6_addr() with the 1st LAN interface 2015-10-30 19:36:42 +01:00
Thomas Bernard
a8f80040c9 Randomize URLs to avoid http://www.filet-o-firewall.com/ 2015-09-14 12:10:15 +02:00
Thomas Bernard
5873c5a6b4 miniupnpd: improve warning log 2015-08-26 10:04:23 +02:00
Thomas Bernard
f8f5f2eb97 miniupnpd: bind to device using SO_BINDTODEVICE 2015-08-26 09:46:05 +02:00
Thomas Bernard
0cf182e51e miniupnpd: remove int_if_name, use ip_mreqn if available 2015-08-25 20:33:47 +02:00
Timothy Redaelli
138ec9e972 miniupnpd: Bind to device
This is needed when you have two interfaces with the same IP address
(for example using tinc)
2015-08-21 16:05:26 +02:00
Thomas Bernard
df85522c73 miniupnpd/miniupnpd.c: commenting #endif + minor cleaning 2015-06-09 15:13:25 +02:00
edrikk
ec0707d559 Add Tomato modifications exactly as is, wrapped by ifdef TOMATO
Add Tomato modifications exactly as is in Tomato firmware, wrapped by #ifdef TOMATO so that it is dormant in base miniupnpd.
This will ease merging upstream changes back to Tomato.
2015-06-05 23:19:52 -04:00
Thomas Bernard
eb72ab5330 miniupnpd.c: don't die when IPv6 is enabled and interface has no IPv4 address 2015-02-20 18:31:55 +01:00
Thomas Bernard
241ede9ddf miniupnpd: improve (some) logs 2015-01-20 14:13:18 +01:00
Thomas Bernard
f795af5f54 2014 => 2015 2015-01-20 14:12:10 +01:00
Thomas Bernard
2d89a05982 miniupnpd/miniupnpd.c: minor fixes in usage output 2014-12-10 10:44:32 +01:00
Thomas Bernard
99a1bafc1f miniupnpd: use time for BOOTID.UPNP.ORG value 2014-12-10 10:41:10 +01:00
Thomas Bernard
00d878eba3 miniupnpd: configurable BOOTID.UPNP.ORG SSDP header 2014-12-10 10:40:41 +01:00