1 $Id: Changelog.txt,v 1.318 2012/10/04 22:11:55 nanard Exp $
4 updated DEFAULTCONNECTIONSERVICE_MAGICALVALUE for IGDv2
5 increased default buffer size for HTTP response
6 More argument check for SOAP actions in UPNP_STRICT mode
7 Better error checking after connect() in upnpevent
10 Fix atoi() on null pointer in upnpsoap.c
11 properly set service/device version in SSDP messages
12 fix newSubscriber() for IP6FirewallControl and DeviceProtection services
13 Enforce compliance for SUBSCRIBE messages (UPNP_STRICT mode)
14 Enforce compliance for UNSUBSCRIBE messages (UPNP_STRICT mode)
15 Ignore "-Wmissing-field-initializers" in upnpdescgen.c
16 check size of h->res_buf before building HTTP response
17 ENABLE_HTTP_DATE : add a Date: header to all HTTP responses
20 Fixes with DISABLE_CONFIG_FILE
22 UPC must be a 12 decimal digit code
23 SetDefaultConnectionService() checks its argumnents in UPNP_STRICT mode
24 Support for Accept-Language/Content-Language HTTP headers
25 Content-Type is now text/xml; charset="utf-8" to conform with UDA v1.1
26 Support Expect: 100-continue for POST HTTP requests
27 Manage services/devices versions in minissdp.c
28 Rename all include guards to not clash with C99.
29 (7.1.3 Reserved identifiers)
32 Cleaning code in ipfw (Jardel Weyrich)
35 Fixing a bug in clean_pinhole_list() under linux/netfilter
38 Adding an informational message at startup
41 Moved man page to section 8. miniupnpd.1 => miniupnpd.8
42 Added install of miniupnpd.8 man page in Makefile.linux
45 improved SubmitServicesToMiniSSDPD() function fiability
48 Add -A command line option to add permission rules
51 Add -z command line option to change friendly name (thanks to Shawn Fisher)
54 added DISABLE_CONFIG_FILE in options.h to disable miniupnpd.conf parsing
55 Add command line parsing for clean_ruleset_interval option
58 Only activate -L option for PF and IPF
59 -a option takes two arguments with MULTIPLE_EXTERNAL_IP defined
62 in UPNP_STRICT mode, the literal IPv6 address in "location:" of SSDP
63 messages is the source address used to send the message
66 Disable -ansi CFLAGS in Makefile.linux because recent iptables headers
67 make use of typeof keyword which is a GCC extension.
70 Improvements in autodetecting firewall under (Free)BSD
73 Cleanup HTTP request handling. Answer 405 when relevant
75 VERSION 1.7 : released the 2012/05/28
78 clean linux/ifacewatcher.c
79 set natpmp socket non blocking
88 Clean expired IPv6 pinholes correctly. and also with linux/netfilter.
91 Finalizing netfilter version of get_pinhole_info()
94 Move IPv6FirewallControl related code from upnpredirect.c to upnppinhole.c
95 Add netfilter implementation for
96 delete_pinhole()/update_pinhole()/get_pinhole_info()
99 Clean up settings of CFLAGS in Makefile's
100 Remove Warnings caused by signed/unsigned integer comparaisons
101 Also fix a couple of integer/pointer comparaisons.
102 Add UNUSED(arg) macro to remove unused argument warning.
103 Fix error handling in upnpevents.c (was causing segfault on Solaris !)
106 Started to implement add_pinhole() for netfilter (linux)
109 Fixed a bug in upnphttp that happened when POST is received in several
110 recv() calls and realloc() is called so the buffer used is moved.
113 Implement CheckPinholeWorking GetPinholePackets. WANIPv6FirewallControl
114 UpdatePinhole still to be done. And also netfilter/ipf/ipfw versions
117 Enough WANIPv6FirewallControl is implemented on pf so that AddPinhole() and
118 DeletePinhole() works !
121 First working experiment of IPv6 "pinhole" with pf
124 More C++ => ANSI C comments to compile with -ansi option
125 Add command line arguments to genconfig.sh config script.
128 Set TTL on SSDP Notify sockets (IPv4). TTL is set to 2 (recommendation from
129 UPnP Device Architecture v1.1)
132 Implementing IPv6 support :
133 Send SSDP NOTIFY ssdp:alive and ssdp:goodbye messages in IPv6.
134 Use UPnP/1.1 in SERVER: string as required in UPnP Device architecture 1.1.
135 Allow LAN interface to be given as interface names, instead of interface
136 IP addresses. It will allow IPv6 operations.
137 fix linux/getifstats.c when bitrate is unknown
140 Only remove pidfile if one was written in the first place.
143 Fix ipfilter support (thanks dhowland https://github.com/dhowland)
146 Changes to miniupnpd.init.d.script by Shawn Landden
149 fixed reload_from_lease_file().
152 Change parselanaddr() function to allow 192.168.1.1/255.255.255.0 in
154 Change read_permission_line() to allow 192.168.1.1/255.255.255.0 in
155 permission line (in configuration file).
158 More syntax checks in upnppermissions.c
161 Fix ipfw/Mac OS X specific source files to compile ok with -ansi flag
164 Make HTTP listen socket non blocking (so accept() can't block)
165 Make SSDP receive sockets non blocking
166 use sockaddr_to_string() in SendSSDPAnnonce2 to handle IPv6 addresses
169 Make HTTP (SOAP) sockets non blocking.
172 Compile ok with -ansi flag.
173 Save a few bytes in options.c using a string repository, instead of a fixed size
174 buffer for each option value.
177 Added friendly_name= option to config file
180 Anchor name (PF) is now configurable through the config file with anchor=
181 Added test of presence of /lib/libip4tc.so and /lib/libip6tc.so files in
182 Makefile.linux in order to add -lip4tc and -lip6tc to LIBS accordingly.
185 always handle EAGAIN, EWOULDBLOCK and EINTR after recv()/recvfrom() calls
188 Always #include <netinet/in.h> before #include <arpa/inet.h> (for OpenBSD)
189 .onrdomain field was added in pf with OpenBSD 5.0. Add PFRULE_HAS_ONRDOMAIN
192 Fixing netfilter/iptables_*.sh scripts for new ifconfig output format.
193 getifaddr.c: added additional checks on structure returned by getifaddrs()
194 Fixing Mac OS X makefile for installation
197 avoid infinite loop in SendResp_upnphttp() in case of error
198 Replaced SendResp_upnphttp() + CloseSocket_upnphttp() by
199 SendRespAndClose_upnphttp()
200 Tomato specifics in genconfig.sh
203 netfilter : Added a tiny_nf_nat.h file to compile with iptables
205 include xtables.h instead of iptables.h
207 VERSION 1.6 : released the 2011/07/25
210 Update doc for version 1.6
213 Fixing code with MULTIPLE_EXTERNAL_IP defined.
216 IPv6 support for UPnP events.
217 Security checks in UPnP events.
220 Remote host for GetListOfPortMappings
221 Remote host support for ipfw (tested on Mac OS X)
224 support for iptables-1.4.11.1
227 Remote host support for pf version
230 Supporting RemoteHost (mandatory in IGD v2)
233 Enabling events by default
236 Fixing Timeout missing in SUBSCRIBE renewal responses
237 (thanks to Pranesh Kulkarni)
238 Added comments about changes between IGD v1 and IGD v2
241 Description and leaseduration kept in ipfw version of the code.
242 Fixing ipfw code after testing under Mac OS X 10.6.7 (darwin 10.7.0)
245 Finishing and testing LeaseDuration support under OpenBSD.
246 Changing NAT-PMP port mapping lifetime support to match
247 lease duration support.
248 NAT-PMP address change announce broadcasted to both port
249 5350 and 5351 to be compatible with client following the
250 version of NAT PMP specification from 2008 or earlier.
251 writepidfile() Overwrite file if already existing
254 fix in linux/getifstats.c.
255 See http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=2212
256 Implementation of LeaseDuration support.
259 added get_wan_connection_status_str()
262 adding ifacewatcher thanks to Alexey Osipov
263 GET /DP.xml is now available. The description has to be completed.
266 Add getconnstatus.c/.h. Dont always have ConnectionStatus to "Connected"
267 Events for WANIPv6FirewallControll
270 patches for gentoo linux.
271 generation of the DeviceProtection service description.
274 Making the SSDP receiving socket work in IPv6 !
277 Support for HTTP in both IPv6 and IPv4.
278 IPv6 for SSDP receiving socket.
281 add new options in genconfig.sh (IGD_V2, ENABLE_DP_SERVICE)
282 add global vars ipv6fc_firewall_enabled and ipv6fc_inbound_pinhole_allowed
283 have MACROS for magical values in upnpdescgen.c, add eventing vars for WanIPv6FirewallControl.
284 applied 0001-Cosmetic-changes.patch(see http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=764)
285 applied 0002-Remove-lan-addresses-limit-by-changing-storage-type-.patch
286 replaced some of the urn:schemas-upnp-org:device:* literal strings by macros.
287 adding some support for IP v6. #define ENABLE_IPV6
288 added -fno-strict-aliasing to compile options.
291 updating upnp descriptions for IGDv2
294 Adding WANIPv6FirewallContro to upnp description
297 adding a UPNP_STRICT config macro. Use it now for checking RemoteHost.
298 ENABLE_6FC_SERVICE : add the implementations of WANIPv6FirewallControl actions
301 preparing getifaddr() for IP v6
302 preparing SSDP stuff for IP v6. Trying to conform to UDA v1.1
305 Some modifications thanks to Daniel Dickinson to improve OpenWRT
310 Added code to generate devices/services descriptions for IGD v2
314 improved netfilter/delete_redirect_and_filter_rules() in order
315 to remove the right filter rule, even if it has another index than
319 clean up an fixes to make netfilter/testiptcrdr compile
322 Make "Makefile" work under Mac OS X with bsdmake.
323 added get_portmappings_in_range() in ipfwrdr.c
326 added get_portmappings_in_range() / upnp_get_portmappings_in_range()
329 Implementation of GetListOfPortMappings
332 Reverting "fixes" done in linux/iptables code the 2010/09/27.
333 see http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=741
336 added MINIUPNPD_VERSION in config.h. Taken from VERSION file.
338 VERSION 1.5 : released the 2011/01/01
341 Started to implement some of the new methods from WANIPConnection v2
344 Some fixes in the linux/iptables code when
345 miniupnpd_nat_chain <> miniupnpd_forward_chain
348 Patch to support nfqueue thanks to Colin McFarlane
351 Update Mac OS X / ipfw stuff from Jardel Weyrich
352 Fix in Makefile.linux for x86_64
355 Bugfix un CleanNATPMPRules() : see http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=640
358 Fixing natpmp sockets.
361 Fix Makefile.linux to compile properly under Mandriva/rh/Fedora with
363 Workaround for bad uptime when started with a bad time set.
366 Tried to make a OpenBSD version 4.7 compatible code... still some
370 updates to testobsdrdr
373 -lip4tc in Makefile.linux.
376 some more error handling in set_startup_time()
377 silencing some warnings
380 Open Several sockets for NAT-PMP to make sure the source address
381 of NAT-PMP replies is right.
382 see http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=609
385 miniupnpdctl now output command line arguments.
386 added a -h option to get help. improved help.
389 using PRIu64 format to printf u_int64_t
390 Fixing calls to get_redirect_rule_by_index() : ifname should be initialized.
391 Add header lines to miniupnpdctl output
394 implementing sending of ip address change notification when receiving
397 VERSION 1.4 : released the 2009/10/30
400 Integrate IPfilter patch from Roy Marples.
401 Fix Netfilter code for old netfilter :
402 see http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=584
403 trim the description string in reload_from_lease_file()
406 Fixing unclosed raw sockets bug with netfilter code.
409 Fixes in ipf code thanks to Roy Marples
410 Enable DragonFly BSD Support thanks to Roy Marples.
411 Allow packager to define default location of config file via CFLAGS
412 Respect $DESTDIR when installing
415 Adding some support for MacOS X and IPFW
416 SO_REUSEADDR in minissdp.c for SSDP listening socket
419 unlink lease file in reload_from_lease_file()
422 Fixed a buffer overflow in ProcessSSDPRequest()
425 improving genconfig.sh for NetBSD : detecting use of pf or ipf
429 working support for iptables >= 1.4.3
432 work to support iptables-1.4.3 and up
435 fix in upnpevents_removeSubscriber()
438 added reload_from_lease_file()
441 Changes in upnpdescgen.c to allow to remove empty elements
442 strcasecmp instead of strcmp on path comparaisons to allow
443 bugged clients to work
446 Some minor changes to Makefile
447 improving Makefile.linux in order to build with iptables not properly
448 installed on the system.
451 Fixing upnpevents thanks to Justin Maggard
454 getifstats() return -1 when supplied with bad arguments
457 Fixed NAT-PMP response when IP not allocated to external interface
461 Reporting Unconnected status when the "external interface" has
462 no IP address assigned. Also added some comments
470 MiniUPnPd is now able to use MiniSSDPd to manage SSDP M-SEARCH answering
473 You can now let miniupnpd choose itself the HTTP port used.
476 Improvements in genconfig.sh for detecting ipf or pf (under FreeBSD)
477 and improve debian/ubuntu stuff.
478 custom chain name patch from :
479 http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=493
482 added USE_IFNAME_IN_RULES macro that can be disabled in order to
483 remove interface name from rules.
486 Fixed compilation without ENABLE_L3F_SERVICE
489 correct UNSUBSCRIBE processing
492 changed iptables_removeall.sh and iptables_init.sh in order
493 to remove IP from the rules
498 Eventing is allmost completly implemented
501 Correct event handling ?
504 enabling tag in PF rules. quick can be set off.
507 implementing event notify
510 fixing a command line parsing error
513 optimisations in upnpsoap.c
516 optimizing upnpsoap.c for size
519 Worked on the Eventing : generating XML event notifications
520 Send initial notification after subscribe
521 Improved pretty print of testupnpdescgen
522 Reduced Memory usage of upnpdescgen
523 fixed a small bug in the description
526 Fixed miniupnpd.c for compiling without natpmp support
527 fixed presentationURL not there with L3F
528 fixing lease file creation/modification
531 Rewrite of Send501() and Send404()
533 genconfig.sh autodetects pf/ipf
536 Started to implement UPnP Events. do NOT use it at the moment !
539 Added support for the Layer3Forwarding Service
540 added init_redirect() and shutdown_redirect() functions
543 Removed Ext: HTTP header when useless
544 enabled the dummy service by default to please windows XP !
547 upnp_enable patch by Nikos Mavrogiannopoulos.
548 lease_file patch by Nikos Mavrogiannopoulos.
551 some changes to Makefile.openwrt
552 use daemon() - daemonize() is still available for systems lacking daemon()
556 moved lan_addr to upnpglobalvars.h/.c
557 Adding experimental multiple external IP support.
560 removed dummy service from description to improve compatibility
562 Add "secure mode". put runtime flags in the same variable
565 Fixed a bug in options.c for the parsing of empty lines.
568 Fixed CleanExpiredNATPMP()
571 Adding a queue parameter for setting ALTQ in pf
574 improving some stuff with the PF_ENABLE_FILTER_RULE.
577 Adding a runtime option to enable/disable NAT-PMP
580 Added a cache in linux getifstats(). Please enable by editing config.h
583 Updating an existing NAT-PMP mapping now works
586 NAT-PMP code now remove expired mappings
587 TCP/UDP where swapped in NAT-PMP code
590 Adding details to the error message for sendto(udp_notify)
593 pf code doesn't generate filter rules by default anymore. The
594 #ifdef PF_ENABLE_FILTER_RULES must be uncommented in config.h.
597 moved some of the prototypes common to all firewalls to commonrdr.h
598 Added functionalities to NAT-PMP
601 Debugged NAT-PMP code
604 Cleaning and improving NAT-PMP code
607 improved the NAT-PMP experimental support
608 updated README and INSTALL files
611 Adding support for NAT-PMP (from apple !)
614 Checking the commandline for errors.
617 Improved the BSD/Solaris Makefile
618 Merging last code from Darren Reed. Solaris/IPF should work now !
622 Adding Darren Reed code for ipf.
625 Adding SunOS support thanks to Darren Reed.
626 Reorganizing os/firewall dependent code thanks to Darren Reed.
629 linux make install support PREFIX variable
632 reorganizing LAN sockets/address to improve multi LAN support.
633 SSDP announces are sent to all configured networks.
634 SSDP responses are "customized" by subnetwork.
637 prototype code to remove unused rules
638 miniupnpdctl now display current rules
639 synchronised add_filter_rule2() prototype between pf and netfilter code.
642 Correctly filling the Cache-control header in SSDP packets
645 update PFRULE_INOUT_COUNTS detection for FreeBSD
648 update version in genconfig.sh
649 do not error when a duplicate redirection is requested.
652 really fixed the compilation bug with linux>=2.6.22
655 fixed an error in options.c that prevented to use packet_log option
658 improved genconfig.sh
659 fixed a compilation bug with linux>=2.6.22
662 added PFRULE_INOUT_COUNTS macro to enable separate in/out packet and
663 bytes counts in pf for OpenBSD >= 3.8
666 removed a possible racecondition in writepidfile()
669 improved genconfig.sh : no more "echo -e", use lsb_release when available
672 get_redirect_rule*() functions now return some statistics about
673 rule usage (bytes and packets)
676 Fixed the get_redirect_desc() in the linux/netfilter code
679 Clean up init code in miniupnpd.c
680 Added a syslog message in SoapError()
683 Now store redirection descriptions in the linux/netfilter code
686 Answers to SSDP M-SEARCH requests with ST: ssdp:all
687 added make install to Makefile.linux
690 Fixed a bug int the DeletePortMapping linux/netfilter implementation
691 It was allways the 1st rule that was deleted.
694 Fixed config.h.openwrt
697 added something in the INSTALL file about the FreeBSD send(udp_notify)
698 problem fix (allowing 239.0.0.0/8 explicitely in pf.conf)
701 added setsockopt(s, SOL_SOCKET, SO_BROADCAST ...) for broadcasting
705 Fixed filter rule under linux : it was using wrong port !
706 thanks to Wesley W. Terpstra
709 Moved some of the SSDP code from miniupnpd.c to minissdp.c
712 creating miniupnpdctl
715 use LOG_MINIUPNPD macro for openlog()
716 simplify miniupndShutdown()
720 Added stuff to change the pf rule "rdr" to "rdr pass"
723 Corrected Bytes per seconds to bits per second.
724 Ryan cleaned up comments and typos.
725 Ryan cleaned up daemonize stuff.
726 Ryan added possibility to configure model number and serial number
729 ryan improved the robustness of most UPnP Soap methods
730 I added a target in the Makefiles to properly generate an uuid using
732 Improved configuration file parsing.
735 Adding uuid option in miniupnpd.conf
738 Added upnppermissions stuff : adding some security to UPnP !
739 fixed XML description thanks to Ryan Wagoner
740 improved QueryStateVariable thanks to Ryan Wagoner
743 use getifaddr() for each GetExtenalIPAddress() Call.
744 We can change the ip during execution without pb
750 Fixed a nasty bug in the linux/netfilter version of get_filter_rule()
753 Improved the handling of the miniupnpd.conf file.
754 added -f option to choose which config file to read.
757 Fixed potential bugs with ClearNameValueList()
760 All by Ryan Wagoner :
761 - coding style and comments cleanup
762 - using now option file miniupnpd.conf
765 changed "xx active incoming HTTP connections" msg
768 Patch from Ryan Wagoner :
769 - no need to open sockets if we can't set the error handlers
770 - format the usage so it fits nicely on a standard size terminal
771 - fix up log_err message so they have the same format and you know what
773 - use same "white space" style throughout
774 - on shutdown no need to continue if opening socket or setsockopt fails
777 reduce amount of log lines (keeping the same information)
782 version 1.0-RC1 released
785 moved strings from upnpdescgen.c to upnpdescstrings.h for
787 Server: HTTP header now comes from a #define
788 added a compilation-time generated config.h
791 minixml updated. should have no impact
792 Added support for presentationURL with -w switch
793 implemented getifstats() for linux. Added testgetifstats program
794 improved error handling in getifstats() BSD
797 no need to have miniupnpc sources to compile miniupnpd.
798 Makefile.openwrt updated
799 Closing sockets on exit thanks to Ryan Wagoner
802 now handling signal SIGINT
803 setting HTTP socket with REUSEADDR thanks to Ryan Wagoner
804 daemon now tested on a Linksys WRT54G device running OpenWRT !
807 disabling rtableid in pf code.
810 Also responds on M-SEARCH with the uuid
813 gaining some space in upnpsoap.c
816 Cleaning up code to comply with ANSI C89
819 Linux version now deleting both nat and accept rules
820 implemented -U option under Linux
823 implemented delete_redirect_rule() for linux
824 returning error 714 in DeletePortMapping() when needed
827 The linux/netfilter version should now WORK !
828 fix in the writepidfile() function. open with a mode !
831 fixing the XML description generation for big endian machines
832 working on the linux/netfilter port
835 improved a lot the handling of HTTP error cases
838 Tried to make the Makefile compatible with both BSDmake
839 and GNUmake. It was hard because of $^ and $<
842 Makefile compatible with BSD make
844 getifstats.c compatible with both OpenBSD and FreeBSD.
847 added getifstats.c for openBSD. May not work under FreeBSD ?
848 now reports bytes/packets sent/received
850 possibility to report system uptime
853 added a -L option to enable loggin (is off by default now).
856 Patch by Ryan Wagoner to correct the XML description (was NewUpTime
857 instead of NewUptime) and implement uptime.
858 Trying to fix the memory leak. Added some comments
859 added a -d option for debugging purpose
860 Tnaks to valgrind (under linux!) I removed a small memory access error.
863 Thanks to a patch sent by Michael van Tellingen, miniupnpd is
864 now ignoring NOTIFY packets sent by other devices and is
865 writing is own pid to /var/run/miniupnpd.pid
868 Allways set sendEvents="no" in XML description (was causing
869 pb with winXP as SUBSCRIBE is not implemented)
872 added translation from hostname to IP in the AddPortMapping() method
873 Thanks to Ryan Wagoner.
876 Added an INSTALL file
879 Added the possibility to change the notify interval
882 Improved compliance of the XML Descriptions
883 pretty print for testupnpdescgen
886 improved the Error 404 response.
887 Better serviceType and serviceId for dummy service...
890 updating the XML description generator
893 Thanks to Rick Richard, support for SSDP "alive" and "byebye" notifications
894 was added. The -u options was also added. The SSDP response are now
896 The -o option is now working (to force a specific external IP address).
897 The Soap Methods errors are correctly responded (401 Invalid Action)
900 Added code to handle filter rules. Thanks to Seth Mos (pfsense.com)
901 storing the descriptions in the label of the rule
904 improved the generation of the XML descriptions.
905 I still need to add allowed values to variables.
908 filtering SSDP requests and responding with same ST: field
911 Added a dummy description for the WANDevice
914 Command line arguments processing
915 Added possibility to listen internally on several interfaces