Commit Graph

250 Commits

Author SHA1 Message Date
Thomas Bernard ac1d36d872 upnphttp.c: Added Ext: header to HTTP responses to conform to UDA 2013-02-07 11:26:48 +01:00
Thomas Bernard 6ca8ee1dcf minissdp.c: ignore SSDP packets missing the MX: header in UPNP_STRICT mode 2013-02-07 11:00:15 +01:00
Thomas Bernard 39a1d85f7a minissdp.c: Fix SSDP packets sent with uuid as ST: header to conform to UDA 2013-02-07 10:59:31 +01:00
Thomas Bernard 5217fdc090 minissdp.c: Add DATE: header in SSDP packets 2013-02-07 10:56:38 +01:00
Thomas Bernard f2d54a84aa miniupnpd: prepare for version 1.8 2013-02-06 15:20:48 +01:00
Thomas Bernard c7419a5de6 miniupnpd: filter HTTP and SSDP based on source IP
Check source address of incomining HTTP connections and SSDP
packets in order to filter out WAN SSDP and HTTP trafic.
2013-02-06 15:20:04 +01:00
Thomas Bernard 43d3939602 miniupnpd: Implement get_src_for_route_to() for *BSD
Also modify get_src_for_route_to() to return
the network interface index
2013-02-06 15:08:10 +01:00
Thomas Bernard dce91afe3c upnpsoap.c: fix 2 memory leaks in GetListOfPortMappings() 2013-02-06 15:03:25 +01:00
Thomas Bernard 50965a6ae1 upnphttp.c: add comments about ParseHttpHeaders() 2013-01-29 22:56:27 +01:00
Thomas Bernard ea141830f6 upnphttp.c: remove strchr() call in ParseHttpHeaders() 2013-01-29 22:55:57 +01:00
Thomas Bernard 72e570186c upnphttp.c: Fix and comment the findendheaders() function 2013-01-29 22:54:55 +01:00
Thomas Bernard 60d1db157a miniupnpd: More return value check for malloc() and realloc() 2012-12-11 22:10:57 +01:00
Thomas Bernard f365c3a9ea minor modifications to linux/getroute.c and testgetroute.c 2012-10-23 14:35:50 +02:00
Thomas Bernard 38939ac2d9 miniupnpd/upnpevents.c: Better error checking after connect() 2012-10-05 00:32:04 +02:00
Thomas Bernard 5de71bc396 miniupnpd/upnpsoap: More argument check for SOAP actions in UPNP_STRICT mode 2012-10-05 00:31:08 +02:00
Thomas Bernard 67bd1f9b42 updated DEFAULTCONNECTIONSERVICE_MAGICALVALUE for IGDv2 2012-10-05 00:29:55 +02:00
Thomas Bernard 5e48745eb3 miniupnpd/upnphttp: fix buffer allocation for response
increased default buffer size for HTTP response
check size of h->res_buf before building HTTP response
2012-10-05 00:28:06 +02:00
Thomas Bernard 1a458fe869 Ignore "-Wmissing-field-initializers" in upnpdescgen.c 2012-10-05 00:26:44 +02:00
Thomas Bernard 4ce891ec17 miniupnpd/upnphttp: Check compliance of headers for (UN)SUBSCRIBE
Enforce compliance for SUBSCRIBE messages (UPNP_STRICT mode)
Enforce compliance for UNSUBSCRIBE messages (UPNP_STRICT mode)
2012-10-05 00:25:08 +02:00
Thomas Bernard 50b70ae90d miniupnpd/upnpevent.c: fix newSubscriber() for IP6FirewallControl and DeviceProtection services 2012-10-05 00:23:02 +02:00
Thomas Bernard f65edba8fa miniupnpd/minissdp.c: properly set service/device version in SSDP messages 2012-10-05 00:21:00 +02:00
Thomas Bernard c0d4c9d24a upnpsoap.c: Fix atoi() on null pointers 2012-10-05 00:19:26 +02:00
Thomas Bernard 7227e55dba ENABLE_HTTP_DATE : add a Date: header to all HTTP responses 2012-10-05 00:17:40 +02:00
Thomas Bernard 239739a6f7 late update of miniupnpd/Changelog.txt 2012-09-28 11:14:10 +02:00
Thomas Bernard e5d7653002 miniupnpd/minissdp.c: Manage services/devices versions 2012-09-28 11:13:48 +02:00
Thomas Bernard 8b8772eed1 miniupnpd: Support Expect: 100-continue for POST HTTP requests 2012-09-28 11:12:50 +02:00
Thomas Bernard 9d94d08bd8 miniupnpd: Content-Type is now text/xml; charset="utf-8" to conform with UDA v1.1 2012-09-28 11:12:01 +02:00
Thomas Bernard 727eaeb2e8 miniupnpd/upnphttp: Support for Accept-Language/Content-Language HTTP headers 2012-09-28 11:10:20 +02:00
Thomas Bernard 988594dfe6 miniupnpd: SetDefaultConnectionService() checks its argumnents in UPNP_STRICT mode 2012-09-28 11:07:12 +02:00
Thomas Bernard ee0815ac85 miniupnpd: UPC must be a 12 decimal digit code 2012-09-28 11:05:34 +02:00
Thomas Bernard 840031dea7 miniupnpd: Fixes with DISABLE_CONFIG_FILE and UPNP_STRICT 2012-09-28 11:04:04 +02:00
Thomas Bernard 8d9900e728 miniupnpd: update of Changelog.txt and Makefile for recent ipfw changes 2012-09-28 10:55:55 +02:00
Thomas Bernard 03005fa291 miniupnpd/netfilter: Fixing a bug in clean_pinhole_list() 2012-09-18 10:31:10 +02:00
Thomas Bernard dd9cbbb7e8 Adding an informational message at startup 2012-09-15 17:36:10 +02:00
Thomas Bernard d148904d2b update/fix changelogs 2012-08-29 09:59:06 +02:00
Thomas Bernard 34c5af41ad miniupnpd: install miniupnpd.8 man page in Makefile.linux 2012-08-24 20:13:15 +02:00
Thomas Bernard d8d416f409 Moved man page to section 8 2012-08-24 20:11:39 +02:00
Thomas Bernard 9805bb6872 improved SubmitServicesToMiniSSDPD() function fiability 2012-08-21 19:33:26 +02:00
Thomas Bernard 04e56b13e1 miniupnpd: Add -A command line option to add permission rules
fixes #15
2012-07-17 21:39:40 +02:00
Thomas Bernard 6451a6906d miniupnpd: Add -z command line option to change friendly name (thanks to Shawn Fisher)
see 896425597e
2012-07-14 17:31:30 +02:00
Thomas Bernard 013b0df388 miniupnpd: detect port in use / already forwarded
Patch submitted by David Kerr
2012-07-10 23:25:29 +02:00
Thomas Bernard 6de4711f8b miniupnpd: Add command line parsing for clean_ruleset_interval option 2012-06-29 21:48:32 +02:00
Thomas Bernard 0df9f7f62a miniupnpd: added DISABLE_CONFIG_FILE in options.h to disable miniupnpd.conf parsing 2012-06-29 21:39:34 +02:00
Thomas Bernard dcae1caf72 update miniupnpd/Changelog.txt 2012-06-29 21:37:52 +02:00
Thomas Bernard 779a71bb6c miniupnpd: IPv6 address used for LOCATION:
in UPNP_STRICT mode, the literal IPv6 address in "location:" of SSDP
messages is now the source address used to send the message.

For linux only at the moment

Also added testgetroute
2012-06-24 01:41:47 +02:00
Thomas Bernard b32c1c7cc6 Disable -ansi in Makefile.linux 2012-06-08 20:17:35 +02:00
Thomas Bernard 28746efd66 Improvements in autodetecting firewall under (Free)BSD 2012-05-31 15:33:16 +02:00
Thomas Bernard adb9941296 Cleanup HTTP request handling. Answer 405 when relevant 2012-05-31 15:29:18 +02:00
Thomas Bernard 2e468c0b69 VERSION 1.7 2012-05-28 01:21:12 +02:00
Thomas Bernard 4cdc0b762e set natpmp socket non blocking 2012-05-28 01:18:06 +02:00
Thomas Bernard 0d56822a71 clean linux/ifacewatcher.c 2012-05-28 01:16:58 +02:00
Thomas Bernard fffeee019f more solaris fixes 2012-05-24 18:52:27 +02:00
Thomas Bernard fe37de7e2c Clean signal handling 2012-05-24 18:17:31 +02:00
Thomas Bernard ff397acf8f Clean expired IPv6 pinholes correctly. and also with linux/netfilter 2012-05-08 22:51:23 +02:00
Thomas Bernard 457092c60a Finalizing netfilter version of get_pinhole_info() 2012-05-08 00:21:03 +02:00
Thomas Bernard ddbc22865f Add netfilter implementation for delete_pinhole()/update_pinhole()/get_pinhole_info() 2012-05-02 00:47:42 +02:00
Thomas Bernard 89212758f2 Move IPv6FirewallControl related code from upnpredirect.c to upnppinhole.c 2012-05-01 22:25:30 +02:00
Thomas Bernard 4edb1c03ce Also fix a couple of integer/pointer comparaisons 2012-05-01 11:53:36 +02:00
Thomas Bernard e42dfd3284 Remove Warnings caused by signed/unsigned integer comparaisons 2012-05-01 11:52:21 +02:00
Thomas Bernard ad95793e93 Add UNUSED(arg) macro to remove unused argument warning. 2012-05-01 11:49:23 +02:00
Thomas Bernard a0f540b1f4 Clean up settings of CFLAGS in Makefile's 2012-05-01 11:34:41 +02:00
Thomas Bernard 19d728d9d8 Fix error handling in upnpevents.c (was causing segfault on Solaris !) 2012-05-01 11:29:40 +02:00
Thomas Bernard 0440f0b8a7 Started to implement add_pinhole() for netfilter (linux) 2012-04-26 16:08:39 +02:00
Thomas Bernard d9cb61b124 Fix a bug in upnphttp
Thanks to Chiaki ISHIKAWA
2012-04-26 00:30:32 +02:00
Thomas Bernard e0efe74a7c AddPinhole() and DeletePinhole() works ! (only with pf) 2012-04-20 16:53:34 +02:00
Thomas Bernard b165afbba7 First working experiment of IPv6 "pinhole" with pf 2012-04-19 01:43:50 +02:00
Thomas Bernard e982ebc9f5 Add command line arguments to genconfig.sh config script 2012-04-15 00:35:31 +02:00
Thomas Bernard 50cb647305 More C++ => ANSI C comments to compile with -ansi option 2012-04-15 00:34:57 +02:00
Thomas Bernard 76da677016 Set TTL on SSDP Notify sockets (IPv4)
TTL is set to 2 (recommendation from UPnP Device Architecture v1.1)
2012-04-12 23:37:59 +02:00
Thomas Bernard 593dc26608 Send SSDP NOTIFY ssdp:alive and ssdp:goodbye in IPv6 too 2012-04-06 19:30:19 +02:00
Thomas Bernard c28d256b30 Use UPnP/1.1 in SERVER: string as required in UDA 1.1
UDA = UPnP Device architecture 1.1
2012-04-06 19:28:05 +02:00
Thomas Bernard 6d32d69608 Allow LAN interface to be given as interface names.
(instead of interface IP addresses)
It will allow IPv6 operations.
2012-04-06 17:31:24 +02:00
Thomas Bernard 225b59a6d3 fix linux/getifstats.c when bitrate is unknown 2012-04-06 17:30:22 +02:00
Thomas Bernard 70c5e194a3 Only remove pidfile if one was written in the first place 2012-03-31 09:22:50 +02:00
Thomas Bernard 31d0dfa345 update miniupnpd/Changelog.txt
Fix ipfilter support (thanks dhowland https://github.com/dhowland)
Changes to miniupnpd.init.d.script by Shawn Landden
2012-03-19 22:15:06 +01:00
Thomas Bernard 2665ed123b Merge branch 'master' of https://github.com/shawnl/miniupnp
Conflicts:
	miniupnpd/upnpredirect.c
2012-03-05 05:59:52 +01:00
Thomas Bernard 57ff044fb7 fixed reload_from_lease_file()
iport and timestamp where mixed
leaseduration always negative and NAT-PMP forwards
 with non-null timestamp always deleted
2012-03-05 05:44:02 +01:00
Shawn Landen 5c224accbf remove trailing whitespace from miniupnpd 2012-02-29 17:48:41 -08:00
Thomas Bernard b1cc7aad36 upnppermissions.c: allow 192.168.1.1/255.255.255.0 as ip/mask
Change read_permission_line() to allow 192.168.1.1/255.255.255.0 in
addition to 192.168.1.1/24 in permission line (in configuration file).
2012-02-15 23:49:56 +01:00
Thomas Bernard f01dc59aa3 miniupnpd.c: parselanaddr() pow parses 192.168.1.1/255.255.255.0
Change parselanaddr() function to allow 192.168.1.1/255.255.255.0 in
addition to 192.168.1.1/24 in configuration file.
2012-02-15 23:48:20 +01:00
Thomas Bernard 0cc68c47b6 More syntax checks in upnppermissions.c 2012-02-12 14:03:42 +01:00
Thomas Bernard a08258f549 Fix ipfw/Mac OS X specific source files to compile ok with -ansi flag 2012-02-12 13:42:37 +01:00
Thomas Bernard d7de40d8cd Make SSDP receive sockets non blocking
Also use sockaddr_to_string() in SendSSDPAnnonce2 to handle IPv6 addresses
2012-02-09 21:33:24 +01:00
Thomas Bernard edfce7672f Make HTTP listen socket non blocking (so accept() can't block) 2012-02-09 21:29:20 +01:00
Thomas Bernard af60fee984 Make HTTP (SOAP) sockets non blocking 2012-02-07 01:26:15 +01:00
Thomas Bernard 439ab615e3 fixed typos 2012-02-07 00:13:56 +01:00
Thomas Bernard 65e277883b options.c: Save a few bytes
Use a string repository, instead of a fixed size buffer for each option value.

Also check realloc() error
2012-02-05 01:31:27 +01:00
Thomas Bernard 9ee74defc8 Compile miniupnpd OK with -ansi flag. 2012-02-05 00:40:50 +01:00
Thomas Bernard a0a1e45ac5 Added friendl_name= option to config file 2012-02-05 00:24:13 +01:00
Thomas Bernard 87a8a06640 automatic -lip4tc and -lip6tc in Makefile.linux
Added test of presence of /lib/libip4tc.so and /lib/libip6tc.so files in
Makefile.linux in order to add -lip4tc and -lip6tc to LIBS accordingly.
2012-02-03 16:12:22 +01:00
Thomas Bernard 874283b36f Anchor name (PF) is now configurable through the config file with anchor= 2012-02-03 13:14:10 +01:00
Thomas Bernard 73ef11624a always handle EAGAIN, EWOULDBLOCK and EINTR after recv()/recvfrom() calls 2012-02-02 18:45:43 +01:00
Thomas Bernard b30d2f8edc Support for OpenBSD 5.0
.onrdomain field was added in ps with OpenBSD 5.0.
Add PFRULE_HAS_ONRDOMAIN
2012-01-20 23:00:37 +01:00
Thomas Bernard c07408ef1f Always #include <netinet/in.h> before #include <arpa/inet.h> (for OpenBSD) 2012-01-20 22:55:43 +01:00
Thomas Bernard dd7273c6d5 Tomato specifics in genconfig.sh 2012-01-20 22:53:15 +01:00
Thomas Bernard 8f68347464 added additional checks on structure returned by getifaddrs() 2012-01-02 11:12:52 +01:00
Thomas Bernard 63a83f8a0a Fixing netfilter/iptables_*.sh scripts for new ifconfig output format
see http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=2623
2012-01-02 10:58:02 +01:00
Thomas Bernard 24065dbaba Replaced SendResp_upnphttp()+CloseSocket_upnphttp() by SendRespAndClose_upnphttp() 2011-11-18 12:23:16 +01:00
Thomas Bernard 0ff86e4975 avoid infinite loop in SendResp_upnphttp() in case of error 2011-11-18 12:15:24 +01:00
Thomas Bernard 0d96346588 Adding miniupnpd 2011-09-28 21:13:20 +02:00