BIND 10 trac2902, updated. 9a49846cb4456b17526c30799df03c9a06c8a318 [2902] Further cleanup as a result of the review.
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed May 22 07:55:08 UTC 2013
The branch, trac2902 has been updated
via 9a49846cb4456b17526c30799df03c9a06c8a318 (commit)
from 18665064e7946e537931caccde60c180e9796127 (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 9a49846cb4456b17526c30799df03c9a06c8a318
Author: Marcin Siodelski <marcin at isc.org>
Date: Wed May 22 09:54:57 2013 +0200
[2902] Further cleanup as a result of the review.
-----------------------------------------------------------------------
Summary of changes:
src/lib/dhcp/pkt_filter_lpf.cc | 21 ++++++++++++++-------
src/lib/dhcp/tests/iface_mgr_unittest.cc | 18 +++---------------
2 files changed, 17 insertions(+), 22 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dhcp/pkt_filter_lpf.cc b/src/lib/dhcp/pkt_filter_lpf.cc
index 2522ad3..e0964d5 100644
--- a/src/lib/dhcp/pkt_filter_lpf.cc
+++ b/src/lib/dhcp/pkt_filter_lpf.cc
@@ -28,14 +28,21 @@ namespace {
using namespace isc::dhcp;
-/// The socket filter program, used to filter out all traffic other
-/// than DHCP. In particular, it allows receipt of UDP packets
-/// on a specific (customizable) port. It does not allow fragmented
-/// packets.
+/// The following structure defines a Berkely Packet Filter program to perform
+/// packet filtering. The program operates on Ethernet packets. To help with
+/// interpretation of the program, for the types of Ethernet packets we are
+/// interested in, the header layout is:
///
-/// Socket filter program is platform independent code which is
-/// executed on the kernel level when new packet arrives. This concept
-/// originates from the Berkeley Packet Filtering supported on BSD systems.
+/// 6 bytes Destination Ethernet Address
+/// 6 bytes Source Ethernet Address
+/// 2 bytes Ethernet packet type
+///
+/// 20 bytes Fixed part of IP header
+/// variable Variable part of IP header
+///
+/// 2 bytes UDP Source port
+/// 2 bytes UDP destination port
+/// 4 bytes Rest of UDP header
///
/// @todo We may want to extend the filter to receive packets sent
/// to the particular IP address assigned to the interface or
diff --git a/src/lib/dhcp/tests/iface_mgr_unittest.cc b/src/lib/dhcp/tests/iface_mgr_unittest.cc
index 09806c5..a65804c 100644
--- a/src/lib/dhcp/tests/iface_mgr_unittest.cc
+++ b/src/lib/dhcp/tests/iface_mgr_unittest.cc
@@ -689,23 +689,11 @@ TEST_F(IfaceMgrTest, socketsFromRemoteAddress) {
// open sockets on the same ports.
ifacemgr->closeSockets();
- // The check below has been commented out. It verified the ability
- // to open suitable socket for sending broadcast request. However,
+ // There used to be a check here that verified the ability to open
+ // suitable socket for sending broadcast request. However,
// there is no guarantee for such test to work on all systems
// because some systems may have no broadcast capable interfaces at all.
-
-/* #if defined(OS_LINUX)
- // Open v4 socket to connect to broadcast address.
- int socket3 = 0;
- IOAddress bcastAddr("255.255.255.255");
- try {
- socket3 = ifacemgr->openSocketFromRemoteAddress(bcastAddr, PORT2);
- } catch (const Exception& ex) {
- std::cout << ex.what() << std::endl;
- FAIL();
- }
- EXPECT_GT(socket3, 0);
-#endif */
+ // Thus, this check has been removed.
// Do not call closeSockets() because it is called by IfaceMgr's
// virtual destructor.
More information about the bind10-changes
mailing list