summaryrefslogtreecommitdiffstats
path: root/src/if.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-02-07 15:04:25 +0000
committerRoy Marples <roy@marples.name>2020-02-07 15:04:25 +0000
commitdb9b001ddf0ead9adfe1b2022d583cb94a7e2d6b (patch)
tree8fcb6c928ec37476a8cf99fdee47995386dcee7f /src/if.c
parentf8b0ee861299423d7fa9714cdc4d50457b431b9f (diff)
downloaddhcpcd-db9b001ddf0ead9adfe1b2022d583cb94a7e2d6b.tar.xz
dhcpcd: randomise hardware address on start if no carrier
For more anonymity.
Diffstat (limited to 'src/if.c')
-rw-r--r--src/if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/if.c b/src/if.c
index 2172ec4e..a4bf4d61 100644
--- a/src/if.c
+++ b/src/if.c
@@ -213,7 +213,7 @@ if_randomisemac(struct interface *ifp)
logdebugx("%s: hardware address randomised to %s",
ifp->name,
- hwaddr_ntoa(buf, sizeof(buf), sbuf, sizeof(sbuf)));
+ hwaddr_ntoa(buf, ifp->hwlen, sbuf, sizeof(sbuf)));
retval = if_setmac(ifp, buf, ifp->hwlen);
if (retval == 0)
memcpy(ifp->hwaddr, buf, ifp->hwlen);