1 $Id: Changelog.txt,v 1.330 2013/02/07 12:22:23 nanard Exp $
4 Add DATE: header in SSDP packets
5 Fix SSDP packets sent with uuid as ST: header to conform to UDA
6 ignore SSDP packets missing the MX: header in UPNP_STRICT mode
7 Added Ext: header to HTTP responses to conform to UDA
8 Refactored SendSSDPNotifies() and SendSSDPGoodbye() and add
9 missing ssdp:alive and ssdp:byebye with NT uuid value.
11 VERSION 1.8 : released on 2013/02/06
14 Check source address of incomining HTTP connections and SSDP
15 packets in order to filter out WAN SSDP and HTTP trafic.
16 Implement get_src_for_route_to() for *BSD
17 fix 2 potential memory leaks in GetListOfPortMappings()
20 upnphttp.c: Fix and comment the findendheaders() function
21 upnphttp.c: remove strchr() call in ParseHttpHeaders()
22 add comments to explain how buffer is checked before calls
26 upnphttp.c: ParseHttpHeaders() now checks atoi() return
29 More return value check for malloc() and realloc()
32 minor modifications to linux/getroute.c and testgetroute.c
35 updated DEFAULTCONNECTIONSERVICE_MAGICALVALUE for IGDv2
36 increased default buffer size for HTTP response
37 More argument check for SOAP actions in UPNP_STRICT mode
38 Better error checking after connect() in upnpevent
41 Fix atoi() on null pointer in upnpsoap.c
42 properly set service/device version in SSDP messages
43 fix newSubscriber() for IP6FirewallControl and DeviceProtection services
44 Enforce compliance for SUBSCRIBE messages (UPNP_STRICT mode)
45 Enforce compliance for UNSUBSCRIBE messages (UPNP_STRICT mode)
46 Ignore "-Wmissing-field-initializers" in upnpdescgen.c
47 check size of h->res_buf before building HTTP response
48 ENABLE_HTTP_DATE : add a Date: header to all HTTP responses
51 Fixes with DISABLE_CONFIG_FILE
53 UPC must be a 12 decimal digit code
54 SetDefaultConnectionService() checks its argumnents in UPNP_STRICT mode
55 Support for Accept-Language/Content-Language HTTP headers
56 Content-Type is now text/xml; charset="utf-8" to conform with UDA v1.1
57 Support Expect: 100-continue for POST HTTP requests
58 Manage services/devices versions in minissdp.c
59 Rename all include guards to not clash with C99.
60 (7.1.3 Reserved identifiers)
63 Cleaning code in ipfw (Jardel Weyrich)
66 Fixing a bug in clean_pinhole_list() under linux/netfilter
69 Adding an informational message at startup
72 Moved man page to section 8. miniupnpd.1 => miniupnpd.8
73 Added install of miniupnpd.8 man page in Makefile.linux
76 improved SubmitServicesToMiniSSDPD() function fiability
79 Add -A command line option to add permission rules
82 Add -z command line option to change friendly name (thanks to Shawn Fisher)
85 added DISABLE_CONFIG_FILE in options.h to disable miniupnpd.conf parsing
86 Add command line parsing for clean_ruleset_interval option
89 Only activate -L option for PF and IPF
90 -a option takes two arguments with MULTIPLE_EXTERNAL_IP defined
93 in UPNP_STRICT mode, the literal IPv6 address in "location:" of SSDP
94 messages is the source address used to send the message
97 Disable -ansi CFLAGS in Makefile.linux because recent iptables headers
98 make use of typeof keyword which is a GCC extension.
101 Improvements in autodetecting firewall under (Free)BSD
104 Cleanup HTTP request handling. Answer 405 when relevant
106 VERSION 1.7 : released the 2012/05/28
109 clean linux/ifacewatcher.c
110 set natpmp socket non blocking
116 Clean signal handling
119 Clean expired IPv6 pinholes correctly. and also with linux/netfilter.
122 Finalizing netfilter version of get_pinhole_info()
125 Move IPv6FirewallControl related code from upnpredirect.c to upnppinhole.c
126 Add netfilter implementation for
127 delete_pinhole()/update_pinhole()/get_pinhole_info()
130 Clean up settings of CFLAGS in Makefile's
131 Remove Warnings caused by signed/unsigned integer comparaisons
132 Also fix a couple of integer/pointer comparaisons.
133 Add UNUSED(arg) macro to remove unused argument warning.
134 Fix error handling in upnpevents.c (was causing segfault on Solaris !)
137 Started to implement add_pinhole() for netfilter (linux)
140 Fixed a bug in upnphttp that happened when POST is received in several
141 recv() calls and realloc() is called so the buffer used is moved.
144 Implement CheckPinholeWorking GetPinholePackets. WANIPv6FirewallControl
145 UpdatePinhole still to be done. And also netfilter/ipf/ipfw versions
148 Enough WANIPv6FirewallControl is implemented on pf so that AddPinhole() and
149 DeletePinhole() works !
152 First working experiment of IPv6 "pinhole" with pf
155 More C++ => ANSI C comments to compile with -ansi option
156 Add command line arguments to genconfig.sh config script.
159 Set TTL on SSDP Notify sockets (IPv4). TTL is set to 2 (recommendation from
160 UPnP Device Architecture v1.1)
163 Implementing IPv6 support :
164 Send SSDP NOTIFY ssdp:alive and ssdp:goodbye messages in IPv6.
165 Use UPnP/1.1 in SERVER: string as required in UPnP Device architecture 1.1.
166 Allow LAN interface to be given as interface names, instead of interface
167 IP addresses. It will allow IPv6 operations.
168 fix linux/getifstats.c when bitrate is unknown
171 Only remove pidfile if one was written in the first place.
174 Fix ipfilter support (thanks dhowland https://github.com/dhowland)
177 Changes to miniupnpd.init.d.script by Shawn Landden
180 fixed reload_from_lease_file().
183 Change parselanaddr() function to allow 192.168.1.1/255.255.255.0 in
185 Change read_permission_line() to allow 192.168.1.1/255.255.255.0 in
186 permission line (in configuration file).
189 More syntax checks in upnppermissions.c
192 Fix ipfw/Mac OS X specific source files to compile ok with -ansi flag
195 Make HTTP listen socket non blocking (so accept() can't block)
196 Make SSDP receive sockets non blocking
197 use sockaddr_to_string() in SendSSDPAnnonce2 to handle IPv6 addresses
200 Make HTTP (SOAP) sockets non blocking.
203 Compile ok with -ansi flag.
204 Save a few bytes in options.c using a string repository, instead of a fixed size
205 buffer for each option value.
208 Added friendly_name= option to config file
211 Anchor name (PF) is now configurable through the config file with anchor=
212 Added test of presence of /lib/libip4tc.so and /lib/libip6tc.so files in
213 Makefile.linux in order to add -lip4tc and -lip6tc to LIBS accordingly.
216 always handle EAGAIN, EWOULDBLOCK and EINTR after recv()/recvfrom() calls
219 Always #include <netinet/in.h> before #include <arpa/inet.h> (for OpenBSD)
220 .onrdomain field was added in pf with OpenBSD 5.0. Add PFRULE_HAS_ONRDOMAIN
223 Fixing netfilter/iptables_*.sh scripts for new ifconfig output format.
224 getifaddr.c: added additional checks on structure returned by getifaddrs()
225 Fixing Mac OS X makefile for installation
228 avoid infinite loop in SendResp_upnphttp() in case of error
229 Replaced SendResp_upnphttp() + CloseSocket_upnphttp() by
230 SendRespAndClose_upnphttp()
231 Tomato specifics in genconfig.sh
234 netfilter : Added a tiny_nf_nat.h file to compile with iptables
236 include xtables.h instead of iptables.h
238 VERSION 1.6 : released the 2011/07/25
241 Update doc for version 1.6
244 Fixing code with MULTIPLE_EXTERNAL_IP defined.
247 IPv6 support for UPnP events.
248 Security checks in UPnP events.
251 Remote host for GetListOfPortMappings
252 Remote host support for ipfw (tested on Mac OS X)
255 support for iptables-1.4.11.1
258 Remote host support for pf version
261 Supporting RemoteHost (mandatory in IGD v2)
264 Enabling events by default
267 Fixing Timeout missing in SUBSCRIBE renewal responses
268 (thanks to Pranesh Kulkarni)
269 Added comments about changes between IGD v1 and IGD v2
272 Description and leaseduration kept in ipfw version of the code.
273 Fixing ipfw code after testing under Mac OS X 10.6.7 (darwin 10.7.0)
276 Finishing and testing LeaseDuration support under OpenBSD.
277 Changing NAT-PMP port mapping lifetime support to match
278 lease duration support.
279 NAT-PMP address change announce broadcasted to both port
280 5350 and 5351 to be compatible with client following the
281 version of NAT PMP specification from 2008 or earlier.
282 writepidfile() Overwrite file if already existing
285 fix in linux/getifstats.c.
286 See http://miniupnp.tuxfamily.org/forum/viewtopic.php?p=2212
287 Implementation of LeaseDuration support.
290 added get_wan_connection_status_str()
293 adding ifacewatcher thanks to Alexey Osipov
294 GET /DP.xml is now available. The description has to be completed.
297 Add getconnstatus.c/.h. Dont always have ConnectionStatus to "Connected"
298 Events for WANIPv6FirewallControll
301 patches for gentoo linux.
302 generation of the DeviceProtection service description.
305 Making the SSDP receiving socket work in IPv6 !
308 Support for HTTP in both IPv6 and IPv4.
309 IPv6 for SSDP receiving socket.
312 add new options in genconfig.sh (IGD_V2, ENABLE_DP_SERVICE)
313 add global vars ipv6fc_firewall_enabled and ipv6fc_inbound_pinhole_allowed
314 have MACROS for magical values in upnpdescgen.c, add eventing vars for WanIPv6FirewallControl.
315 applied 0001-Cosmetic-changes.patch(see http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=764)
316 applied 0002-Remove-lan-addresses-limit-by-changing-storage-type-.patch
317 replaced some of the urn:schemas-upnp-org:device:* literal strings by macros.
318 adding some support for IP v6. #define ENABLE_IPV6
319 added -fno-strict-aliasing to compile options.
322 updating upnp descriptions for IGDv2
325 Adding WANIPv6FirewallContro to upnp description
328 adding a UPNP_STRICT config macro. Use it now for checking RemoteHost.
329 ENABLE_6FC_SERVICE : add the implementations of WANIPv6FirewallControl actions
332 preparing getifaddr() for IP v6
333 preparing SSDP stuff for IP v6. Trying to conform to UDA v1.1
336 Some modifications thanks to Daniel Dickinson to improve OpenWRT
341 Added code to generate devices/services descriptions for IGD v2
345 improved netfilter/delete_redirect_and_filter_rules() in order
346 to remove the right filter rule, even if it has another index than
350 clean up an fixes to make netfilter/testiptcrdr compile
353 Make "Makefile" work under Mac OS X with bsdmake.
354 added get_portmappings_in_range() in ipfwrdr.c
357 added get_portmappings_in_range() / upnp_get_portmappings_in_range()
360 Implementation of GetListOfPortMappings
363 Reverting "fixes" done in linux/iptables code the 2010/09/27.
364 see http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=741
367 added MINIUPNPD_VERSION in config.h. Taken from VERSION file.
369 VERSION 1.5 : released the 2011/01/01
372 Started to implement some of the new methods from WANIPConnection v2
375 Some fixes in the linux/iptables code when
376 miniupnpd_nat_chain <> miniupnpd_forward_chain
379 Patch to support nfqueue thanks to Colin McFarlane
382 Update Mac OS X / ipfw stuff from Jardel Weyrich
383 Fix in Makefile.linux for x86_64
386 Bugfix un CleanNATPMPRules() : see http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=640
389 Fixing natpmp sockets.
392 Fix Makefile.linux to compile properly under Mandriva/rh/Fedora with
394 Workaround for bad uptime when started with a bad time set.
397 Tried to make a OpenBSD version 4.7 compatible code... still some
401 updates to testobsdrdr
404 -lip4tc in Makefile.linux.
407 some more error handling in set_startup_time()
408 silencing some warnings
411 Open Several sockets for NAT-PMP to make sure the source address
412 of NAT-PMP replies is right.
413 see http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=609
416 miniupnpdctl now output command line arguments.
417 added a -h option to get help. improved help.
420 using PRIu64 format to printf u_int64_t
421 Fixing calls to get_redirect_rule_by_index() : ifname should be initialized.
422 Add header lines to miniupnpdctl output
425 implementing sending of ip address change notification when receiving
428 VERSION 1.4 : released the 2009/10/30
431 Integrate IPfilter patch from Roy Marples.
432 Fix Netfilter code for old netfilter :
433 see http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=584
434 trim the description string in reload_from_lease_file()
437 Fixing unclosed raw sockets bug with netfilter code.
440 Fixes in ipf code thanks to Roy Marples
441 Enable DragonFly BSD Support thanks to Roy Marples.
442 Allow packager to define default location of config file via CFLAGS
443 Respect $DESTDIR when installing
446 Adding some support for MacOS X and IPFW
447 SO_REUSEADDR in minissdp.c for SSDP listening socket
450 unlink lease file in reload_from_lease_file()
453 Fixed a buffer overflow in ProcessSSDPRequest()
456 improving genconfig.sh for NetBSD : detecting use of pf or ipf
460 working support for iptables >= 1.4.3
463 work to support iptables-1.4.3 and up
466 fix in upnpevents_removeSubscriber()
469 added reload_from_lease_file()
472 Changes in upnpdescgen.c to allow to remove empty elements
473 strcasecmp instead of strcmp on path comparaisons to allow
474 bugged clients to work
477 Some minor changes to Makefile
478 improving Makefile.linux in order to build with iptables not properly
479 installed on the system.
482 Fixing upnpevents thanks to Justin Maggard
485 getifstats() return -1 when supplied with bad arguments
488 Fixed NAT-PMP response when IP not allocated to external interface
492 Reporting Unconnected status when the "external interface" has
493 no IP address assigned. Also added some comments
501 MiniUPnPd is now able to use MiniSSDPd to manage SSDP M-SEARCH answering
504 You can now let miniupnpd choose itself the HTTP port used.
507 Improvements in genconfig.sh for detecting ipf or pf (under FreeBSD)
508 and improve debian/ubuntu stuff.
509 custom chain name patch from :
510 http://miniupnp.tuxfamily.org/forum/viewtopic.php?t=493
513 added USE_IFNAME_IN_RULES macro that can be disabled in order to
514 remove interface name from rules.
517 Fixed compilation without ENABLE_L3F_SERVICE
520 correct UNSUBSCRIBE processing
523 changed iptables_removeall.sh and iptables_init.sh in order
524 to remove IP from the rules
529 Eventing is allmost completly implemented
532 Correct event handling ?
535 enabling tag in PF rules. quick can be set off.
538 implementing event notify
541 fixing a command line parsing error
544 optimisations in upnpsoap.c
547 optimizing upnpsoap.c for size
550 Worked on the Eventing : generating XML event notifications
551 Send initial notification after subscribe
552 Improved pretty print of testupnpdescgen
553 Reduced Memory usage of upnpdescgen
554 fixed a small bug in the description
557 Fixed miniupnpd.c for compiling without natpmp support
558 fixed presentationURL not there with L3F
559 fixing lease file creation/modification
562 Rewrite of Send501() and Send404()
564 genconfig.sh autodetects pf/ipf
567 Started to implement UPnP Events. do NOT use it at the moment !
570 Added support for the Layer3Forwarding Service
571 added init_redirect() and shutdown_redirect() functions
574 Removed Ext: HTTP header when useless
575 enabled the dummy service by default to please windows XP !
578 upnp_enable patch by Nikos Mavrogiannopoulos.
579 lease_file patch by Nikos Mavrogiannopoulos.
582 some changes to Makefile.openwrt
583 use daemon() - daemonize() is still available for systems lacking daemon()
587 moved lan_addr to upnpglobalvars.h/.c
588 Adding experimental multiple external IP support.
591 removed dummy service from description to improve compatibility
593 Add "secure mode". put runtime flags in the same variable
596 Fixed a bug in options.c for the parsing of empty lines.
599 Fixed CleanExpiredNATPMP()
602 Adding a queue parameter for setting ALTQ in pf
605 improving some stuff with the PF_ENABLE_FILTER_RULE.
608 Adding a runtime option to enable/disable NAT-PMP
611 Added a cache in linux getifstats(). Please enable by editing config.h
614 Updating an existing NAT-PMP mapping now works
617 NAT-PMP code now remove expired mappings
618 TCP/UDP where swapped in NAT-PMP code
621 Adding details to the error message for sendto(udp_notify)
624 pf code doesn't generate filter rules by default anymore. The
625 #ifdef PF_ENABLE_FILTER_RULES must be uncommented in config.h.
628 moved some of the prototypes common to all firewalls to commonrdr.h
629 Added functionalities to NAT-PMP
632 Debugged NAT-PMP code
635 Cleaning and improving NAT-PMP code
638 improved the NAT-PMP experimental support
639 updated README and INSTALL files
642 Adding support for NAT-PMP (from apple !)
645 Checking the commandline for errors.
648 Improved the BSD/Solaris Makefile
649 Merging last code from Darren Reed. Solaris/IPF should work now !
653 Adding Darren Reed code for ipf.
656 Adding SunOS support thanks to Darren Reed.
657 Reorganizing os/firewall dependent code thanks to Darren Reed.
660 linux make install support PREFIX variable
663 reorganizing LAN sockets/address to improve multi LAN support.
664 SSDP announces are sent to all configured networks.
665 SSDP responses are "customized" by subnetwork.
668 prototype code to remove unused rules
669 miniupnpdctl now display current rules
670 synchronised add_filter_rule2() prototype between pf and netfilter code.
673 Correctly filling the Cache-control header in SSDP packets
676 update PFRULE_INOUT_COUNTS detection for FreeBSD
679 update version in genconfig.sh
680 do not error when a duplicate redirection is requested.
683 really fixed the compilation bug with linux>=2.6.22
686 fixed an error in options.c that prevented to use packet_log option
689 improved genconfig.sh
690 fixed a compilation bug with linux>=2.6.22
693 added PFRULE_INOUT_COUNTS macro to enable separate in/out packet and
694 bytes counts in pf for OpenBSD >= 3.8
697 removed a possible racecondition in writepidfile()
700 improved genconfig.sh : no more "echo -e", use lsb_release when available
703 get_redirect_rule*() functions now return some statistics about
704 rule usage (bytes and packets)
707 Fixed the get_redirect_desc() in the linux/netfilter code
710 Clean up init code in miniupnpd.c
711 Added a syslog message in SoapError()
714 Now store redirection descriptions in the linux/netfilter code
717 Answers to SSDP M-SEARCH requests with ST: ssdp:all
718 added make install to Makefile.linux
721 Fixed a bug int the DeletePortMapping linux/netfilter implementation
722 It was allways the 1st rule that was deleted.
725 Fixed config.h.openwrt
728 added something in the INSTALL file about the FreeBSD send(udp_notify)
729 problem fix (allowing 239.0.0.0/8 explicitely in pf.conf)
732 added setsockopt(s, SOL_SOCKET, SO_BROADCAST ...) for broadcasting
736 Fixed filter rule under linux : it was using wrong port !
737 thanks to Wesley W. Terpstra
740 Moved some of the SSDP code from miniupnpd.c to minissdp.c
743 creating miniupnpdctl
746 use LOG_MINIUPNPD macro for openlog()
747 simplify miniupndShutdown()
751 Added stuff to change the pf rule "rdr" to "rdr pass"
754 Corrected Bytes per seconds to bits per second.
755 Ryan cleaned up comments and typos.
756 Ryan cleaned up daemonize stuff.
757 Ryan added possibility to configure model number and serial number
760 ryan improved the robustness of most UPnP Soap methods
761 I added a target in the Makefiles to properly generate an uuid using
763 Improved configuration file parsing.
766 Adding uuid option in miniupnpd.conf
769 Added upnppermissions stuff : adding some security to UPnP !
770 fixed XML description thanks to Ryan Wagoner
771 improved QueryStateVariable thanks to Ryan Wagoner
774 use getifaddr() for each GetExtenalIPAddress() Call.
775 We can change the ip during execution without pb
781 Fixed a nasty bug in the linux/netfilter version of get_filter_rule()
784 Improved the handling of the miniupnpd.conf file.
785 added -f option to choose which config file to read.
788 Fixed potential bugs with ClearNameValueList()
791 All by Ryan Wagoner :
792 - coding style and comments cleanup
793 - using now option file miniupnpd.conf
796 changed "xx active incoming HTTP connections" msg
799 Patch from Ryan Wagoner :
800 - no need to open sockets if we can't set the error handlers
801 - format the usage so it fits nicely on a standard size terminal
802 - fix up log_err message so they have the same format and you know what
804 - use same "white space" style throughout
805 - on shutdown no need to continue if opening socket or setsockopt fails
808 reduce amount of log lines (keeping the same information)
813 version 1.0-RC1 released
816 moved strings from upnpdescgen.c to upnpdescstrings.h for
818 Server: HTTP header now comes from a #define
819 added a compilation-time generated config.h
822 minixml updated. should have no impact
823 Added support for presentationURL with -w switch
824 implemented getifstats() for linux. Added testgetifstats program
825 improved error handling in getifstats() BSD
828 no need to have miniupnpc sources to compile miniupnpd.
829 Makefile.openwrt updated
830 Closing sockets on exit thanks to Ryan Wagoner
833 now handling signal SIGINT
834 setting HTTP socket with REUSEADDR thanks to Ryan Wagoner
835 daemon now tested on a Linksys WRT54G device running OpenWRT !
838 disabling rtableid in pf code.
841 Also responds on M-SEARCH with the uuid
844 gaining some space in upnpsoap.c
847 Cleaning up code to comply with ANSI C89
850 Linux version now deleting both nat and accept rules
851 implemented -U option under Linux
854 implemented delete_redirect_rule() for linux
855 returning error 714 in DeletePortMapping() when needed
858 The linux/netfilter version should now WORK !
859 fix in the writepidfile() function. open with a mode !
862 fixing the XML description generation for big endian machines
863 working on the linux/netfilter port
866 improved a lot the handling of HTTP error cases
869 Tried to make the Makefile compatible with both BSDmake
870 and GNUmake. It was hard because of $^ and $<
873 Makefile compatible with BSD make
875 getifstats.c compatible with both OpenBSD and FreeBSD.
878 added getifstats.c for openBSD. May not work under FreeBSD ?
879 now reports bytes/packets sent/received
881 possibility to report system uptime
884 added a -L option to enable loggin (is off by default now).
887 Patch by Ryan Wagoner to correct the XML description (was NewUpTime
888 instead of NewUptime) and implement uptime.
889 Trying to fix the memory leak. Added some comments
890 added a -d option for debugging purpose
891 Tnaks to valgrind (under linux!) I removed a small memory access error.
894 Thanks to a patch sent by Michael van Tellingen, miniupnpd is
895 now ignoring NOTIFY packets sent by other devices and is
896 writing is own pid to /var/run/miniupnpd.pid
899 Allways set sendEvents="no" in XML description (was causing
900 pb with winXP as SUBSCRIBE is not implemented)
903 added translation from hostname to IP in the AddPortMapping() method
904 Thanks to Ryan Wagoner.
907 Added an INSTALL file
910 Added the possibility to change the notify interval
913 Improved compliance of the XML Descriptions
914 pretty print for testupnpdescgen
917 improved the Error 404 response.
918 Better serviceType and serviceId for dummy service...
921 updating the XML description generator
924 Thanks to Rick Richard, support for SSDP "alive" and "byebye" notifications
925 was added. The -u options was also added. The SSDP response are now
927 The -o option is now working (to force a specific external IP address).
928 The Soap Methods errors are correctly responded (401 Invalid Action)
931 Added code to handle filter rules. Thanks to Seth Mos (pfsense.com)
932 storing the descriptions in the label of the rule
935 improved the generation of the XML descriptions.
936 I still need to add allowed values to variables.
939 filtering SSDP requests and responding with same ST: field
942 Added a dummy description for the WANDevice
945 Command line arguments processing
946 Added possibility to listen internally on several interfaces