miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IPv6 address given to control points

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs
View previous topic :: View next topic  
Author Message
shirsch



Joined: 28 Oct 2015
Posts: 2

PostPosted: Thu Oct 29, 2015 12:07 am    Post subject: IPv6 address given to control points Reply with quote

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1452

PostPosted: Fri Oct 30, 2015 6:33 pm    Post subject: Reply with quote

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.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1452

PostPosted: Fri Oct 30, 2015 6:37 pm    Post subject: Reply with quote

better :
https://github.com/miniupnp/miniupnp/commit/4afc6fcf7f3b163b3d5a997418bf48674ec1a72b.patch
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
shirsch



Joined: 28 Oct 2015
Posts: 2

PostPosted: Sat Oct 31, 2015 2:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.