aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Marshall <tdm@cyngn.com>2015-06-03 14:27:29 -0700
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2015-06-04 03:18:09 +0000
commita9a6cc7e181aca2db900235cd5f1cea9bc74f3b5 (patch)
treee7dc935e335164d17531cd396b130b63c2d78446
parent0c3ebeddbf79ab746a5dcd259575ee464372f3dd (diff)
downloadandroid_external_dhcpcd-stable/cm-12.0-YNG1TA.tar.gz
android_external_dhcpcd-stable/cm-12.0-YNG1TA.tar.bz2
android_external_dhcpcd-stable/cm-12.0-YNG1TA.zip
dhcpcd: Send proper DUIDstable/cm-12.0-YNG1TA
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 b92246818a9eaece78d09d173e16fe18357f7429)
-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);