Browse Source

[2902] Source HW address is an interface MAC address.

Marcin Siodelski 12 years ago
parent
commit
6e966c8f89
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/lib/dhcp/pkt_filter_lpf.cc

+ 5 - 0
src/lib/dhcp/pkt_filter_lpf.cc

@@ -164,6 +164,11 @@ PktFilterLPF::send(const Iface& iface, uint16_t sockfd, const Pkt4Ptr& pkt) {
 
     OutputBuffer buf(14);
 
+    HWAddrPtr hwaddr(new HWAddr(iface.getMac(), iface.getMacLen(),
+                                iface.getHWType()));
+    pkt->setLocalHWAddr(hwaddr);
+
+
     // Ethernet frame header.
     // Note that we don't validate whether HW addresses in 'pkt'
     // are valid because they are validated be the function called.