]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5009] Compilation fixes for Linux
authorTomek Mrugalski <tomasz@isc.org>
Tue, 20 Sep 2016 09:37:02 +0000 (11:37 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Tue, 20 Sep 2016 09:37:02 +0000 (11:37 +0200)
src/lib/dhcp/pkt_filter_inet.cc
src/lib/dhcp/pkt_filter_lpf.cc

index 287dfbd83c3e32aa736b019883c4014ad4ec776d..b780c49406175ae6c51b51c5bdfd76be18ad2e4c 100644 (file)
@@ -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
 
index 6a5b1896c350023e189e8d15097b9255ff738949..73ec38f81d3a5849c00de13ea1c55106090d472c 100644 (file)
@@ -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;