summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ip
diff options
context:
space:
mode:
authorJacob Moody <moody@posixcafe.org>2022-06-05 18:02:58 +0000
committerJacob Moody <moody@posixcafe.org>2022-06-05 18:02:58 +0000
commit207d124dfeb141a7ed9333a3666970752a83db40 (patch)
tree37891de60ee3195a86508c9e204670979bb837c6 /sys/src/cmd/ip
parentd8d433894a706ec65384bd8a18630d18912f0f78 (diff)
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.
Diffstat (limited to 'sys/src/cmd/ip')
-rw-r--r--sys/src/cmd/ip/dhcpd/dhcpd.c1
1 files changed, 1 insertions, 0 deletions
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);