Mercurial > hg > dhcpcd
diff src/if-options.c @ 5574:2a519da0f1a2 draft
DHCP: Split hardware address randomisation out of anonymous option
A 3rd party might want to control the randomisation.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Mon, 28 Dec 2020 00:02:26 +0000 |
| parents | 0c4608a6cc2a |
| children |
line wrap: on
line diff
--- a/src/if-options.c Sun Dec 27 23:52:44 2020 +0000 +++ b/src/if-options.c Mon Dec 28 00:02:26 2020 +0000 @@ -120,6 +120,7 @@ {"ipv4only", no_argument, NULL, '4'}, {"ipv6only", no_argument, NULL, '6'}, {"anonymous", no_argument, NULL, O_ANONYMOUS}, + {"randomise_hwaddr",no_argument, NULL, O_RANDOMISE_HWADDR}, {"arping", required_argument, NULL, O_ARPING}, {"destination", required_argument, NULL, O_DESTINATION}, {"fallback", required_argument, NULL, O_FALLBACK}, @@ -1304,6 +1305,9 @@ #endif break; + case O_RANDOMISE_HWADDR: + ifo->randomise_hwaddr = true; + break; #ifdef INET case O_ARPING: while (arg != NULL) {
