From dfca0be219074f8473683256b1b9ca986ec37c43 Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Sun, 14 May 2023 23:56:11 +0000 Subject: dhcp: skip android junk options --- sys/src/cmd/ip/ipconfig/dhcp.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/src') diff --git a/sys/src/cmd/ip/ipconfig/dhcp.c b/sys/src/cmd/ip/ipconfig/dhcp.c index 6d710a51e..dc26c401c 100644 --- a/sys/src/cmd/ip/ipconfig/dhcp.c +++ b/sys/src/cmd/ip/ipconfig/dhcp.c @@ -950,6 +950,11 @@ parseoptions(uchar *p, int n) int code, len, nin = n; while (n > 0) { + /* Android shouldn't be sending us this garbage; filter it out */ + if(strncmp((char*)p, "ANDROID_METERED", n) == 0){ + p += strlen("ANDROID_METERED"); + continue; + } code = *p++; n--; if(code == OBend) -- cgit v1.2.3