BIND 10 trac2902, updated. 8f4d5d803a3fad8019f8b4b638731d533c6dae16 [2902] Do not swap local and remote HW address when sending response.
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Apr 29 17:43:08 UTC 2013
The branch, trac2902 has been updated
via 8f4d5d803a3fad8019f8b4b638731d533c6dae16 (commit)
from 4f47c644ff2ba7b3d062e51d4b7eef4f87417301 (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 8f4d5d803a3fad8019f8b4b638731d533c6dae16
Author: Marcin Siodelski <marcin at isc.org>
Date: Mon Apr 29 19:42:58 2013 +0200
[2902] Do not swap local and remote HW address when sending response.
-----------------------------------------------------------------------
Summary of changes:
src/bin/dhcp4/dhcp4_srv.cc | 6 +++---
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc
index 41233e2..426b26b 100644
--- a/src/bin/dhcp4/dhcp4_srv.cc
+++ b/src/bin/dhcp4/dhcp4_srv.cc
@@ -375,12 +375,12 @@ Dhcpv4Srv::copyDefaultFields(const Pkt4Ptr& question, Pkt4Ptr& answer) {
// If src/dest HW addresses are used by the packet filtering class
// we need to copy them as well.
HWAddrPtr src_hw_addr = question->getLocalHWAddr();
- HWAddrPtr dst_hw_addr = question->getRemoteHWAddr();
if (src_hw_addr) {
- answer->setRemoteHWAddr(src_hw_addr);
+ answer->setLocalHWAddr(src_hw_addr);
}
+ HWAddrPtr dst_hw_addr = question->getRemoteHWAddr();
if (dst_hw_addr) {
- answer->setLocalHWAddr(dst_hw_addr);
+ answer->setRemoteHWAddr(dst_hw_addr);
}
}
diff --git a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
index f74c240..0a19e6e 100644
--- a/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
+++ b/src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
@@ -176,8 +176,8 @@ public:
// When processing an incoming packet the remote address
// is copied as a src address, and the source address is
// copied as a remote address to the response.
- EXPECT_TRUE(q->getLocalHWAddr() == a->getRemoteHWAddr());
- EXPECT_TRUE(q->getRemoteHWAddr() == a->getLocalHWAddr());
+ EXPECT_TRUE(q->getLocalHWAddr() == a->getLocalHWAddr());
+ EXPECT_TRUE(q->getRemoteHWAddr() == a->getRemoteHWAddr());
// Check that bare minimum of required options are there.
// We don't check options requested by a client. Those
More information about the bind10-changes
mailing list