Browse Source

[2902] Fixed remote address setting in the unit tests.

Marcin Siodelski 12 years ago
parent
commit
b9be6a9538

+ 2 - 0
src/lib/dhcp/tests/pkt_filter_inet_unittest.cc

@@ -132,6 +132,7 @@ TEST_F(PktFilterInetTest, send) {
 
     // Set required fields.
     pkt->setLocalAddr(IOAddress("127.0.0.1"));
+    pkt->setRemoteAddr(IOAddress("127.0.0.1"));
     pkt->setRemotePort(PORT);
     pkt->setLocalPort(PORT + 1);
     pkt->setIndex(ifindex_);
@@ -210,6 +211,7 @@ TEST_F(PktFilterInetTest, receive) {
 
     // Set required fields.
     pkt->setLocalAddr(IOAddress("127.0.0.1"));
+    pkt->setRemoteAddr(IOAddress("127.0.0.1"));
     pkt->setRemotePort(PORT);
     pkt->setLocalPort(PORT + 1);
     pkt->setIndex(ifindex_);

+ 2 - 0
src/lib/dhcp/tests/pkt_filter_lpf_unittest.cc

@@ -145,6 +145,7 @@ TEST_F(PktFilterLPFTest, DISABLED_send) {
     // in its response. The send() function should be able to detect
     // it and correct the source address.
     pkt->setLocalAddr(IOAddress("255.255.255.255"));
+    pkt->setRemoteAddr(IOAddress("127.0.0.1"));
     pkt->setRemotePort(PORT);
     pkt->setLocalPort(PORT + 1);
     pkt->setIndex(ifindex_);
@@ -234,6 +235,7 @@ TEST_F(PktFilterLPFTest, DISABLED_receive) {
 
     // Set required fields.
     pkt->setLocalAddr(IOAddress("127.0.0.1"));
+    pkt->setRemoteAddr(IOAddress("127.0.0.1"));
     pkt->setRemotePort(PORT);
     pkt->setLocalPort(PORT + 1);
     pkt->setIndex(ifindex_);