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
commit57ab5f7c51248ddb529ac28617082f306418065c (patch)
tree8fcb6c928ec37476a8cf99fdee47995386dcee7f /src/if.c
parentccf3a5e9fe4ea8f63cfcdb27f96b02ec2cc8ff70 (diff)
downloaddhcpcd-57ab5f7c51248ddb529ac28617082f306418065c.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);