Skip to content

Commit

Permalink
dhcpcd: Send proper DUID
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tdmcyngn committed Jun 3, 2015
1 parent e499680 commit b922468
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dhcpcd.c
Expand Up @@ -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);
Expand Down

0 comments on commit b922468

Please sign in to comment.