View previous topic :: View next topic |
Author |
Message |
shirsch
Joined: 28 Oct 2015 Posts: 2
|
Posted: Thu Oct 29, 2015 12:07 am Post subject: IPv6 address given to control points |
|
|
I have 3 interfaces with IPv6 addresses. One is external (internet), one is internal (LAN), and one is internal VPN. It appears that miniupnpd is picking the last interface available with an IPv6 address as the control point for IPv6. I would think that it should choose the listening interface as the IPv6 control point source. Currently, the result is in an unpredictable control point at boot vs restart of miniupnpd. In my particular case, it happens to pick the tunnel address from my VPN on a restart of miniupnpd, vs the external IPv6 address during a boot. I don't believe this is correct. I'm guessing that the listening interface name should be sent to function "find_ipv6_addr" instead of the current "NULL" in "miniupnpd.c" at line 1922. |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1594
|
Posted: Fri Oct 30, 2015 6:33 pm Post subject: |
|
|
yep you are right.
Code: | diff --git a/miniupnpd/miniupnpd.c b/miniupnpd/miniupnpd.c
index e876030..dac7883 100644
--- a/miniupnpd/miniupnpd.c
+++ b/miniupnpd/miniupnpd.c
@@ -1919,7 +1919,7 @@ main(int argc, char * * argv)
#endif /* V6SOCKETS_ARE_V6ONLY */
#endif /* ENABLE_HTTPS */
#ifdef ENABLE_IPV6
- if(find_ipv6_addr(NULL, ipv6_addr_for_http_with_brackets, sizeof
+ if(find_ipv6_addr(lan_addrs.lh_first->ifname, ipv6_addr_for_http
syslog(LOG_NOTICE, "HTTP IPv6 address given to control p
ipv6_addr_for_http_with_brackets);
} else {
|
tell me if it's ok for you _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1594
|
|
Back to top |
|
 |
shirsch
Joined: 28 Oct 2015 Posts: 2
|
Posted: Sat Oct 31, 2015 2:51 am Post subject: |
|
|
Yes, this patch now has miniupnpd using the LAN interface's IPv6 address for the control point at both boot and during restarts of miniupnpd. Thank you! |
|
Back to top |
|
 |
|