summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfox <fox@netbsd.org>2020-02-07 14:13:59 +0000
committerRoy Marples <roy@marples.name>2020-02-07 14:13:59 +0000
commit690a9c3080708e958ec52341a26f33aa961dbf13 (patch)
treec17ab0d9d489b84efb35603f3406893981d11d77
parentee8903a11073a41364875c1a4d20969a0e086666 (diff)
downloaddhcpcd-690a9c3080708e958ec52341a26f33aa961dbf13.tar.xz
dhcp: Cast away a compile warning
-rw-r--r--src/dhcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dhcp.c b/src/dhcp.c
index d111d99a..dd59945f 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -3307,7 +3307,7 @@ is_packet_udp_bootp(void *packet, size_t plen)
memcpy(&udp, (char *)ip + ip_hlen, sizeof(udp));
if (ntohs(udp.uh_ulen) < sizeof(udp))
return false;
- if (ip_hlen + ntohs(udp.uh_ulen) > plen)
+ if (ip_hlen + (size_t)ntohs(udp.uh_ulen) > plen)
return false;
/* Check it's to and from the right ports. */