BIND 10 trac2013, updated. 9e812734e020c04ef076f6b2fc38d3f872a0c361 [2013] corrected the return value of socket.accept().
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Jun 1 22:28:51 UTC 2012
The branch, trac2013 has been updated
via 9e812734e020c04ef076f6b2fc38d3f872a0c361 (commit)
via d3e3aa8bb4c6d409c2af01a72270369eb00cc03a (commit)
via 3e0f47f73941c7c1249ee7fb79a880770d7fb76a (commit)
via fa9af9770151197c95bd8366f608bb7b56751243 (commit)
via 23e49e12b90f0360ad02e5d97dd40db50a52b79d (commit)
from 71fcb404d2cf321b39e898ed21c18a27435a6d34 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9e812734e020c04ef076f6b2fc38d3f872a0c361
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Jun 1 15:05:32 2012 -0700
[2013] corrected the return value of socket.accept().
not directly related to the subject of this branch, but it's a small bug fix
in a file we are updating, so it seemed reasonable to incorporate it here.
commit d3e3aa8bb4c6d409c2af01a72270369eb00cc03a
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Jun 1 15:03:34 2012 -0700
[2013] simplified a boolean expression without using unnecessary if-else.
commit 3e0f47f73941c7c1249ee7fb79a880770d7fb76a
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Jun 1 15:01:24 2012 -0700
[2013] narrowed a try block so exception-free part is outside of the block.
commit fa9af9770151197c95bd8366f608bb7b56751243
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Jun 1 14:56:23 2012 -0700
[2013] revised log message description on broken wire-format data.
commit 23e49e12b90f0360ad02e5d97dd40db50a52b79d
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Jun 1 14:16:18 2012 -0700
[2013] removed garbaged introduced in rebasing
-----------------------------------------------------------------------
Summary of changes:
src/bin/ddns/ddns.py.in | 19 +++++++++----------
src/bin/ddns/ddns_messages.mes | 16 ++++++++--------
src/bin/ddns/tests/ddns_test.py | 4 ++--
src/lib/python/isc/ddns/libddns_messages.mes | 3 ---
4 files changed, 19 insertions(+), 23 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/ddns/ddns.py.in b/src/bin/ddns/ddns.py.in
index da664b3..252d3ca 100755
--- a/src/bin/ddns/ddns.py.in
+++ b/src/bin/ddns/ddns.py.in
@@ -128,15 +128,14 @@ def get_datasrc_client(cc_session):
function will simply be removed.
'''
+ HARDCODED_DATASRC_CLASS = RRClass.IN()
+ file, is_default = cc_session.get_remote_config_value("Auth",
+ "database_file")
+ # See xfrout.py:get_db_file() for this trick:
+ if is_default and "B10_FROM_BUILD" in os.environ:
+ file = os.environ["B10_FROM_BUILD"] + "/bind10_zones.sqlite3"
+ datasrc_config = '{ "database_file": "' + file + '"}'
try:
- HARDCODED_DATASRC_CLASS = RRClass.IN()
- file, is_default = cc_session.get_remote_config_value("Auth",
- "database_file")
- # See xfrout.py:get_db_file() for this trick:
- if is_default and "B10_FROM_BUILD" in os.environ:
- file = os.environ["B10_FROM_BUILD"] + "/bind10_zones.sqlite3"
-
- datasrc_config = '{ "database_file": "' + file + '"}'
return HARDCODED_DATASRC_CLASS, DataSourceClient('sqlite3',
datasrc_config)
except isc.datasrc.Error as ex:
@@ -271,10 +270,10 @@ class DDNSServer:
Accept another connection and create the session receiver.
"""
try:
- sock = self._listen_socket.accept()
+ (sock, remote_addr) = self._listen_socket.accept()
fileno = sock.fileno()
logger.debug(TRACE_BASIC, DDNS_NEW_CONN, fileno,
- sock.getpeername())
+ remote_addr if remote_addr else '<anonymous address>')
receiver = isc.util.cio.socketsession.SocketSessionReceiver(sock)
self._socksession_receivers[fileno] = (sock, receiver)
except (socket.error, isc.util.cio.socketsession.SocketSessionError) \
diff --git a/src/bin/ddns/ddns_messages.mes b/src/bin/ddns/ddns_messages.mes
index f259777..6596134 100644
--- a/src/bin/ddns/ddns_messages.mes
+++ b/src/bin/ddns/ddns_messages.mes
@@ -72,14 +72,14 @@ and will now shut down.
% DDNS_REQUEST_PARSE_FAIL failed to parse update request: %1
b10-ddns received an update request via b10-auth, but the received
-data failed to pass minimum validation: it was either totally broken
-as an any valid DNS message (there can be many reasons for that), or
-the opcode is not update, or TSIG is included in the request but it
-fails to validate. Since b10-auth should have performed this level of
-checks, such an error shouldn't be detected at this stage and should
-rather be considered an internal bug. This event is therefore logged
-at the error level, and the request is simply dropped. Additional
-information of the error is also logged.
+data failed to pass minimum validation: it was either broken wire
+format data for a valid DNS message (e.g. it's shorter than the
+fixed-length header), or the opcode is not update, or TSIG is included
+in the request but it fails to validate. Since b10-auth should have
+performed this level of checks, such an error shouldn't be detected at
+this stage and should rather be considered an internal bug. This
+event is therefore logged at the error level, and the request is
+simply dropped. Additional information of the error is also logged.
% DDNS_RESPONSE_SOCKET_ERROR failed to send update response to %1: %2
Network I/O error happens in sending an update request. The
diff --git a/src/bin/ddns/tests/ddns_test.py b/src/bin/ddns/tests/ddns_test.py
index f1a8733..7415258 100755
--- a/src/bin/ddns/tests/ddns_test.py
+++ b/src/bin/ddns/tests/ddns_test.py
@@ -70,7 +70,7 @@ class FakeSocket:
def getpeername(self):
return "fake_unix_socket"
def accept(self):
- return FakeSocket(self.__fileno + 1)
+ return FakeSocket(self.__fileno + 1), '/dummy/path'
def sendto(self, data, addr):
self._sent_data = data
self._sent_addr = addr
@@ -621,7 +621,7 @@ class TestDDNSession(unittest.TestCase):
client_addr = TEST_CLIENT6 if ipv6 else TEST_CLIENT4
tsig = TSIGContext(tsig_key) if tsig_key is not None else None
rcode = Rcode.NOERROR() if result == UPDATE_SUCCESS else Rcode.REFUSED()
- has_response = False if result == UPDATE_DROP else True
+ has_response = (result != UPDATE_DROP)
self.assertEqual(has_response,
self.server.handle_request((self.__sock,
diff --git a/src/lib/python/isc/ddns/libddns_messages.mes b/src/lib/python/isc/ddns/libddns_messages.mes
index 5586a83..b82bac8 100644
--- a/src/lib/python/isc/ddns/libddns_messages.mes
+++ b/src/lib/python/isc/ddns/libddns_messages.mes
@@ -104,9 +104,6 @@ RRset exists (value independent). At least one RR with a
specified NAME and TYPE (in the zone and class specified by
the Zone Section) must exist.
-=======
->>>>>>> 644c706... [1458] cleanup: reorder log message files
-
% LIBDDNS_UPDATE_APPROVED update client %1 for zone %2 approved
Debug message. An update request was approved in terms of the zone's
update ACL.
More information about the bind10-changes
mailing list