From 207d124dfeb141a7ed9333a3666970752a83db40 Mon Sep 17 00:00:00 2001 From: Jacob Moody Date: Sun, 5 Jun 2022 18:02:58 +0000 Subject: ip/dhcpd: properly skip past ipv6 addresses in addrsopt If the first address passed happened to be an ipv6 address we would send a malformed option by never including a ipv4 address. --- sys/src/cmd/ip/dhcpd/dhcpd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/src/cmd/ip') diff --git a/sys/src/cmd/ip/dhcpd/dhcpd.c b/sys/src/cmd/ip/dhcpd/dhcpd.c index 93b83c8f8..c5b708aa9 100644 --- a/sys/src/cmd/ip/dhcpd/dhcpd.c +++ b/sys/src/cmd/ip/dhcpd/dhcpd.c @@ -1477,6 +1477,7 @@ addrsopt(Req *rp, int t, uchar **ip, int i) while(i-- > 0){ if (!isv4(*ip)) { op = seprint(op, oe, " skipping %I ", *ip); + ip++; continue; } v6tov4(rp->p, *ip); -- cgit v1.2.3