diff --git a/osdep/Binder.hpp b/osdep/Binder.hpp index 660e6f0c3..a6c668f85 100644 --- a/osdep/Binder.hpp +++ b/osdep/Binder.hpp @@ -316,8 +316,13 @@ public: #endif } else { - for(std::vector::const_iterator i(explicitBind.begin());i!=explicitBind.end();++i) - localIfAddrs.insert(std::pair(*i,std::string())); + for(std::vector::const_iterator i(explicitBind.begin());i!=explicitBind.end();++i) { + InetAddress ip = InetAddress(*i); + for(int x=0;x<(int)portCount;++x) { + ip.setPort(ports[x]); + localIfAddrs.insert(std::pair(ip,std::string())); + } + } } // Default to binding to wildcard if we can't enumerate addresses