diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-04-19 18:51:28 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-04-19 18:51:28 +0000 |
commit | 56fc9a6b8b30f5c88120e1ddabcfdc92ae494dbe (patch) | |
tree | 2c6226d041119689528449031544751919132073 /src | |
parent | 403d826a8b6b94e7cfe7d4cffbbc9a843fbea66b (diff) |
Fix for bug #261 - Needs QA'ing.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6813 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/inspsocket.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 620f11737..5641ba6ef 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -190,6 +190,7 @@ bool InspSocket::BindAddr(const std::string &ip) if (inet_pton(AF_INET6, IP.c_str(), &n) > 0) { memcpy(&((sockaddr_in6*)s)->sin6_addr, &n, sizeof(n)); + ((sockaddr_in6*)s)->sin6_port = 0; ((sockaddr_in6*)s)->sin6_family = AF_INET6; size = sizeof(sockaddr_in6); } @@ -206,6 +207,7 @@ bool InspSocket::BindAddr(const std::string &ip) if (inet_aton(IP.c_str(), &n) > 0) { ((sockaddr_in*)s)->sin_addr = n; + ((sockaddr_in*)s)->sin_port = 0; ((sockaddr_in*)s)->sin_family = AF_INET; } else @@ -220,6 +222,7 @@ bool InspSocket::BindAddr(const std::string &ip) if (insp_aton(IP.c_str(), &n) > 0) { ((sockaddr_in*)s)->sin_addr = n; + ((sockaddr_in*)s)->sin_port = 0; ((sockaddr_in*)s)->sin_family = AF_INET; } else |