shithub: riscv

Download patch

ref: 207d124dfeb141a7ed9333a3666970752a83db40
parent: d8d433894a706ec65384bd8a18630d18912f0f78
author: Jacob Moody <moody@posixcafe.org>
date: Sun Jun 5 14:02:58 EDT 2022

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.

--- a/sys/src/cmd/ip/dhcpd/dhcpd.c
+++ b/sys/src/cmd/ip/dhcpd/dhcpd.c
@@ -1477,6 +1477,7 @@
 	while(i-- > 0){
 		if (!isv4(*ip)) {
 			op = seprint(op, oe, " skipping %I ", *ip);
+			ip++;
 			continue;
 		}
 		v6tov4(rp->p, *ip);