diff --git a/miniupnpd/Changelog.txt b/miniupnpd/Changelog.txt index 3a29ebf..5853ea8 100644 --- a/miniupnpd/Changelog.txt +++ b/miniupnpd/Changelog.txt @@ -1,4 +1,7 @@ -$Id: Changelog.txt,v 1.394 2014/12/10 09:33:24 nanard Exp $ +$Id: Changelog.txt,v 1.395 2015/02/10 15:01:02 nanard Exp $ + +2015/02/10: + IP wildcard for AddPinhole() is empty string 2014/12/10: Checking Host: HTTP request header to prevent DNS rebinding attack diff --git a/miniupnpd/netfilter/iptpinhole.c b/miniupnpd/netfilter/iptpinhole.c index 048f45f..978e4c0 100644 --- a/miniupnpd/netfilter/iptpinhole.c +++ b/miniupnpd/netfilter/iptpinhole.c @@ -1,4 +1,4 @@ -/* $Id: iptpinhole.c,v 1.13 2015/02/08 09:44:20 nanard Exp $ */ +/* $Id: iptpinhole.c,v 1.14 2015/02/10 15:01:03 nanard Exp $ */ /* MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * (c) 2012-2015 Thomas Bernard @@ -217,7 +217,7 @@ int add_pinhole(const char * ifname, if(ifname) strncpy(e->ipv6.iniface, ifname, IFNAMSIZ); - if(rem_host) { + if(rem_host && (rem_host[0] != '\0')) { inet_pton(AF_INET6, rem_host, &e->ipv6.src); memset(&e->ipv6.smsk, 0xff, sizeof(e->ipv6.smsk)); } @@ -350,7 +350,7 @@ get_pinhole_info(unsigned short uid, p = get_pinhole(uid); if(!p) return -2; /* Not found */ - if(rem_host) { + if(rem_host && (rem_host[0] != '\0')) { if(inet_ntop(AF_INET6, &p->saddr, rem_host, rem_hostlen) == NULL) return -1; } diff --git a/miniupnpd/upnpsoap.c b/miniupnpd/upnpsoap.c index 45b6c9c..30b240d 100644 --- a/miniupnpd/upnpsoap.c +++ b/miniupnpd/upnpsoap.c @@ -1,4 +1,4 @@ -/* $Id: upnpsoap.c,v 1.134 2015/02/08 09:17:14 nanard Exp $ */ +/* $Id: upnpsoap.c,v 1.135 2015/02/10 15:01:24 nanard Exp $ */ /* MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * (c) 2006-2015 Thomas Bernard @@ -1477,7 +1477,7 @@ AddPinhole(struct upnphttp * h, const char * action) } /* I guess it is useless to convert int_ip to literal ipv6 address */ /* rem_host should be converted to literal ipv6 : */ - if(rem_host) + if(rem_host && (rem_host[0] != '\0')) { struct addrinfo *ai, *p; struct addrinfo hints;