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 

[PATCH] Source address of NAT-PMP replies

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



Joined: 13 Jan 2010
Posts: 2

PostPosted: Wed Jan 13, 2010 9:52 pm    Post subject: [PATCH] Source address of NAT-PMP replies Reply with quote

Because the nat-pmp udp socket is bound to INADDR_ANY, replies to nat-pmp requests sometimes have a wrong source address if the host running miniupnpd has multiple ip addresses in the same subnet. In my case, requests sent to my gw's carp interface (192.168.100.1/24) get replies from the physical interfaces address (192.168.100.2/24) which are ignored by the requesting client.

The following patch fixes this by adding separate udp sockets for nat-pmp, bound to each configured listening_ip.
Back to top
View user's profile Send private message
oos



Joined: 13 Jan 2010
Posts: 2

PostPosted: Wed Jan 13, 2010 9:53 pm    Post subject: Reply with quote

Couldn't add link to first port, here's the patch: http://pastebin.com/m10ddfdac
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1518

PostPosted: Thu Jan 14, 2010 3:27 am    Post subject: Reply with quote

thank you for your patch.
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
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.