Browse Source

[5009] Compilation fixes for Linux

Tomek Mrugalski 8 years ago
parent
commit
68b38a0926
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/lib/dhcp/pkt_filter_inet.cc
  2. 1 1
      src/lib/dhcp/pkt_filter_lpf.cc

+ 1 - 1
src/lib/dhcp/pkt_filter_inet.cc

@@ -256,7 +256,7 @@ PktFilterInet::send(const Iface&, uint16_t sockfd,
     struct in_pktinfo* pktinfo =(struct in_pktinfo *)CMSG_DATA(cmsg);
     memset(pktinfo, 0, sizeof(struct in_pktinfo));
     pktinfo->ipi_ifindex = pkt->getIndex();
-    pktinfo->ipi_spec_dst.s_addr = htonl(pkt->getLocalAddr()); // set the source IP address
+    pktinfo->ipi_spec_dst.s_addr = htonl(pkt->getLocalAddr().toUint32()); // set the source IP address
     m.msg_controllen = CMSG_SPACE(sizeof(struct in_pktinfo));
 #endif
 

+ 1 - 1
src/lib/dhcp/pkt_filter_lpf.cc

@@ -167,7 +167,7 @@ PktFilterLPF::openSocket(Iface& iface,
     // Configure the filter program to receive unicast packets sent to the
     // specified address. The program will also allow packets sent to the
     // 255.255.255.255 broadcast address.
-    dhcp_sock_filter[8].k = static_cast<uint32_t>(addr);
+    dhcp_sock_filter[8].k = addr.toUint32();
 
     // Override the default port value.
     dhcp_sock_filter[11].k = port;