aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Marshall <tdm@cyngn.com>2015-06-03 14:27:29 -0700
committerTom Marshall <tdm@cyngn.com>2015-06-03 22:20:37 +0000
commit1a35e3f3ce3cc299adc6f2ad54afec3da5ce6391 (patch)
treee7dc935e335164d17531cd396b130b63c2d78446
parent0c3ebeddbf79ab746a5dcd259575ee464372f3dd (diff)
downloadandroid_external_dhcpcd-stable/cm-12.0-YNG1T.tar.gz
android_external_dhcpcd-stable/cm-12.0-YNG1T.tar.bz2
android_external_dhcpcd-stable/cm-12.0-YNG1T.zip
dhcpcd: Send proper DUIDstable/cm-12.0-YNG1T
Since we go to all the trouble to save and read back the DUID, we might as well actually *use* it instead of sending random heap garbage over the wire. This is fixed upstream as part of a larger commit: http://roy.marples.name/projects/dhcpcd/ci/d10652b16bf97708?sbs=1 That (and other fixes) should probably be merged at some point, but this fixes the immediate issue. Note this issue was exposed after the DUID file location was fixed by I009cc0b4e4e94fc0adffd0418d0a9b1e3e485f2a. Prior to that commit, the DUID command line option was ineffective. Also note that AOSP uses the (ineffective) -D option for all devices, but CAF does not. Change-Id: I3f319a956cb500cf041d5e37dc35a51896ee544c Fixes: BACON-3269 (cherry picked from commit 3ad41a30d48823d6aebe1b03a2d1ab7f4854cf94)
-rw-r--r--dhcpcd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index 6eae970..a98034a 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -834,6 +834,7 @@ configure_interface1(struct interface *iface)
ifl = htonl(if_nametoindex(iface->name));
memcpy(iface->clientid + 2, &ifl, 4);
}
+ memcpy(iface->clientid + 6, duid, len);
} else if (len == 0) {
len = iface->hwlen + 1;
iface->clientid = xmalloc(len + 1);