[svn] commit: r2096 - in /trunk: ChangeLog src/bin/bindctl/bindcmd.py
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Jun 9 03:48:55 UTC 2010
Author: zhanglikun
Date: Wed Jun 9 03:48:54 2010
New Revision: 2096
Log:
Generate a unique session ID by using socket.gethostname() instead of socket.gethostbyname(), since the latter one could make bindctl stall if its own host name can't be resolved.(the patch was created by Jinmei and reviewed by zhanglikun)
Modified:
trunk/ChangeLog
trunk/src/bin/bindctl/bindcmd.py
Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog (original)
+++ trunk/ChangeLog Wed Jun 9 03:48:54 2010
@@ -1,3 +1,10 @@
+ 53. [bug] zhanglikun
+ bin/bindctl: Generate a unique session ID by using
+ socket.gethostname() instead of socket.gethostbyname(),
+ since the latter one could make bindctl stall if its own
+ host name can't be resolved.
+ (Trac #228, svn r2096)
+
52. [func] zhanglikun
bin/xfrout: When xfrout is launched, check whether the
socket file is being used by one running xfrout process,
Modified: trunk/src/bin/bindctl/bindcmd.py
==============================================================================
--- trunk/src/bin/bindctl/bindcmd.py (original)
+++ trunk/src/bin/bindctl/bindcmd.py Wed Jun 9 03:48:54 2010
@@ -87,8 +87,8 @@
'''Generate one session id for the connection. '''
rand = os.urandom(16)
now = time.time()
- ip = socket.gethostbyname(socket.gethostname())
- session_id = sha1(("%s%s%s" %(rand, now, ip)).encode())
+ session_id = sha1(("%s%s%s" %(rand, now,
+ socket.gethostname())).encode())
digest = session_id.hexdigest()
return digest
More information about the bind10-changes
mailing list