git: 9front

Download patch

ref: 02bf9cc4d72096c205b3c56de7018ad5e28afa0b
parent: e5ddfdfc91bffaf0d3985493448dca44dd3b9e4f
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);
--