BIND 10 trac991, updated. 69127fa628cf8cf44362b9334ae1c0e6c6ee5475 [991] Clarified the comment when responding to broadcast address.
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Apr 4 16:31:07 UTC 2013
The branch, trac991 has been updated
via 69127fa628cf8cf44362b9334ae1c0e6c6ee5475 (commit)
from 43ad3049d20a10c2a96ae85b167694aaaaadb6be (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 69127fa628cf8cf44362b9334ae1c0e6c6ee5475
Author: Marcin Siodelski <marcin at isc.org>
Date: Thu Apr 4 18:30:56 2013 +0200
[991] Clarified the comment when responding to broadcast address.
-----------------------------------------------------------------------
Summary of changes:
src/bin/dhcp4/dhcp4_srv.cc | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc
index 4a2730d..c532093 100644
--- a/src/bin/dhcp4/dhcp4_srv.cc
+++ b/src/bin/dhcp4/dhcp4_srv.cc
@@ -528,7 +528,17 @@ Dhcpv4Srv::assignLease(const Pkt4Ptr& question, Pkt4Ptr& answer) {
} else {
// Since IfaceMgr does not support direct responses to
// clients not having IP address, we have to send response
- // to broadcast.
+ // to broadcast. Note that we don't check whether the
+ // use_bcast flag was set in the constructor or not.
+ // However, the use_bcast flag is mostly used by unit tests
+ // to prevent opening broadcast sockets in the constructor
+ // of this class because opening broadcast sockets requires
+ // root privileges. For this reason, it is rather unlikely
+ // that use_bcast flag is set to false in the real life
+ // scenario. On the other hand, if we fail to set remote
+ // address to broadcast here, we can't unit-test the case when
+ // server doesn't support direct responses to the client
+ // which doesn't have address yet.
answer->setRemoteAddr(IOAddress("255.255.255.255"));
}
}
More information about the bind10-changes
mailing list