Commit 8f4d5d80 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[2902] Do not swap local and remote HW address when sending response.

parent 4f47c644
......@@ -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) {
HWAddrPtr dst_hw_addr = question->getRemoteHWAddr();
if (dst_hw_addr) {
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment