pass ext_if_name arg to add_pinhole()

should fix #228
This commit is contained in:
Thomas Bernard 2017-03-13 11:47:21 +01:00
parent 2c02ef2b7b
commit da64fd85cb
4 changed files with 6 additions and 4 deletions

View File

@ -3,6 +3,7 @@ $Id: Changelog.txt,v 1.430 2016/12/16 09:14:40 nanard Exp $
2017/03/13:
default to client address for AddPortMapping when <NewInternalClient>
is empty
pass ext_if_name to add_pinhole()
2016/12/23:
Fix UDA-1.2.10 Man header empty or invalid

View File

@ -1,7 +1,7 @@
/* $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-2016 Thomas Bernard
* (c) 2012-2017 Thomas Bernard
* This software is subject to the conditions detailed
* in the LICENCE file provided within the distribution */
@ -221,6 +221,7 @@ int add_pinhole(const char * ifname,
if (proto)
e->ipv6.flags |= IP6T_F_PROTO;
/* TODO: check if enforcing USE_IFNAME_IN_RULES is needed */
if(ifname)
strncpy(e->ipv6.iniface, ifname, IFNAMSIZ);
if(rem_host && (rem_host[0] != '\0')) {

View File

@ -2,7 +2,7 @@
/* vim: tabstop=4 shiftwidth=4 noexpandtab
* MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* (c) 2012-2016 Thomas Bernard
* (c) 2012-2017 Thomas Bernard
* This software is subject to the conditions detailed
* in the LICENCE file provided within the distribution */

View File

@ -1,7 +1,7 @@
/* $Id: upnppinhole.c,v 1.7 2014/12/09 09:13:53 nanard Exp $ */
/* MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* (c) 2006-2016 Thomas Bernard
* (c) 2006-2017 Thomas Bernard
* This software is subject to the conditions detailed
* in the LICENCE file provided within the distribution */
@ -141,7 +141,7 @@ upnp_add_inboundpinhole(const char * raddr,
return (r >= 0) ? 1 : r;
}
#if defined(USE_PF) || defined(USE_NETFILTER)
*uid = add_pinhole (0/*ext_if_name*/, raddr, rport,
*uid = add_pinhole (ext_if_name, raddr, rport,
iaddr, iport, proto, desc, timestamp);
return *uid >= 0 ? 1 : -1;
#else