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 21:44:14 +0000
commitb92246818a9eaece78d09d173e16fe18357f7429 (patch)
treee7dc935e335164d17531cd396b130b63c2d78446
parente499680f0832d6f959a3d5290085d61cce0f6907 (diff)
downloadandroid_external_dhcpcd-stable/cm-12.0-YNG4N.tar.gz
android_external_dhcpcd-stable/cm-12.0-YNG4N.tar.bz2
android_external_dhcpcd-stable/cm-12.0-YNG4N.zip
dhcpcd: Send proper DUIDstable/cm-12.0-YNG4N
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
-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);