Thomas Bernard
86030db849
fix error from commit 13585f15c7
2018-12-18 23:47:54 +01:00
Thomas Bernard
cb8a02af7a
pcpserver.c: copyIPv6IfDifferent() check for NULL src argument
2018-12-18 23:04:14 +01:00
Thomas Bernard
f321c2066b
upnp_redirect(): accept NULL desc argument
2018-12-18 22:59:18 +01:00
Thomas Bernard
13585f15c7
GetOutboundPinholeTimeout: check args
2018-12-18 22:54:51 +01:00
Thomas Bernard
bec6ccec63
upnp_event_prepare(): check the return value of snprintf()
2018-12-18 22:37:14 +01:00
Thomas Bernard
6b4e9bd855
upnpstun.c: fix generate_transaction_id()
2018-12-15 18:02:46 +01:00
Steven Mestdagh
f6fc66ee41
avoid off-by-one buffer overread
...
similar to commit 9fcc0a72f0
2018-12-06 00:11:21 +01:00
Thomas Bernard
e7fa40f60b
update INSTALL about running a NAT behind NAT setup.
...
also update 2017->2018
2018-10-31 18:33:56 +01:00
Thomas Bernard
bde31cd4f1
update miniupnpd/Changelog.txt
2018-09-07 17:28:42 +02:00
Thomas Bernard
95d707a71f
pcpserver.c: properly fill the opcode field of response
...
fixes #327
2018-09-07 17:24:43 +02:00
Pali Rohár
a2baa36312
Fix compilation with nftables
...
Fixes #324
2018-09-06 17:44:41 +02:00
Thomas Bernard
11785205f1
Merge remote-tracking branch 'Lochnair/fix_nftables' into travis-ci-nftables
2018-07-15 12:59:25 +02:00
Nils Andreas Svee
181428e843
miniupnpd: add update_portmappings functions for nft
2018-07-14 19:59:26 +02:00
Thomas Bernard
ac796a4077
linux: add -lrt when building for glibc < 2.17
2018-07-14 14:23:13 +02:00
Thomas Bernard
d27a3152bd
fix generate_transaction_id()
2018-07-06 15:29:15 +02: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
6e5a88098d
fix file headers (=>2018)
...
Signed-off-by: Thomas Bernard <miniupnp@free.fr>
2018-07-06 14:16:49 +02:00
Thomas Bernard
d84e004849
Fix upnpstun.o dependencies
2018-07-06 14:16:07 +02:00
Thomas Bernard
810cb665c2
Merge branch 'pr_307'
...
see #307
2018-07-06 13:40:18 +02:00
Thomas Bernard
012cad4111
Makefile.linux: fix depends
2018-07-06 13:36:23 +02:00
Thomas Bernard
b2343c87a7
Add STUN support
...
see #307
2018-07-06 13:33:33 +02:00
Thomas Bernard
18ec4e88e7
asyncsendto.c: 2018
2018-07-06 13:31:44 +02:00
Thomas Bernard
1da39554c7
fixes in upnpstun.c
...
Signed-off-by: Thomas Bernard <miniupnp@free.fr>
2018-07-06 13:31:26 +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
8c91ff515e
reserved[] is const
2018-07-06 13:20:30 +02:00
Nils Andreas Svee
5262990d8e
miniupnpd: support newer libnftnl versions
2018-07-01 23:50:12 +02:00
Thomas Bernard
ef179a45e3
do not check empty string with strlen(s) == 0
...
see #292
2018-06-01 10:55:45 +02:00
Thomas Bernard
72005ce86a
add -w option to iptables.
...
see https://miniupnp.tuxfamily.org/forum/viewtopic.php?p=5113
Signed-off-by: Thomas Bernard <miniupnp@free.fr>
2018-05-29 12:26:33 +02:00
Pali Rohár
c1472ffe4e
miniupnpd: GetExternalIPAddress(): Instead of invalid IP address 0.0.0.0 returns error 501
...
IP address 0.0.0.0 is filled when it is not possible to retrieve IP address. According to specification, GetExternalIPAddress() can return error 501 when action failed.
2018-05-19 17:28:43 +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
Pali Rohár
c35935c61d
miniupnpd: Add function addr_is_reserved() to check if address is private/reserved and therefore not for public port forwarding
2018-05-19 13:31:14 +02:00
Pali Rohár
4f53b322fd
miniupnpd: Add function perform_stun() for detecting external IP address and restrictive NAT via STUN protocol
...
It automatically unblock selected UDP ports for incoming responses and after finishing ports unblock is removed.
2018-05-19 13:31:08 +02:00
Pali Rohár
cd7284785b
miniupnpd: Add function delete_filter_rule() also for PF and Linux Netfilter
...
It is needed for STUN implementation.
2018-05-19 13:31:02 +02:00
Thomas Bernard
582375b64f
miniupnpd: VERSION 2.1
2018-05-08 23:40:27 +02:00
Thomas Bernard
e11bbf0bc0
miniupnpd/pcp: Send PCP announcment at startup
...
fixes #254
2018-05-08 23:06:19 +02:00
yangfl
b3849ef311
Fix OS detection for Debian kFreeBSD
2018-05-08 21:59:15 +08:00
Thomas Bernard
d2bbdee995
fix typo introduced in 00abd9e6c8
2018-05-03 09:54:02 +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
d0e7958617
lease_file_remove(): replace strncpy/strncat by snprintf()
2018-05-01 13:04:20 +02:00
Thomas Bernard
f6ac854f0f
miniupnpd: fix storing of unlimited lease time in lease_file
...
see #295
2018-05-01 11:26:49 +02:00
Thomas Bernard
17773f0a72
if LEASEFILE_USE_REMAINING_TIME is defined, only the remaining time is stored
...
see #295
2018-04-30 17:25:26 +02:00
Thomas Bernard
00abd9e6c8
miniupnpd: store UNIX time in lease_file
...
fixes #295
2018-04-30 16:59:40 +02:00
Thomas Bernard
491ee9f8bf
miniupnpd/upnpevents.c: Add log when error
2018-04-27 00:08:06 +02:00
Thomas Bernard
239d048489
Merge branch 'pf_use_ext_ip_addr'
2018-04-22 21:27:44 +02:00
Thomas Bernard
5dcd40aece
netfilter/iptpinhole.c: remove warning: implicit declaration of function 'upnp_time'
...
fixes ef94635100
2018-04-22 21:24:30 +02:00
Thomas Bernard
0366cd0ba0
replace strlen(s) > 0 by s[0] != '\0'
...
see #292
2018-04-22 21:21:58 +02:00