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.
This commit is contained in:
Jacob Moody 2022-06-05 18:02:58 +00:00
parent d8d433894a
commit 207d124dfe

View file

@ -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);