diff options
| author | Roy Marples <roy@marples.name> | 2020-11-25 14:19:55 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-11-25 14:19:55 +0000 |
| commit | 21d355135157335a8d85a14412c006dff3eb41ff (patch) | |
| tree | 99239a69d53c64e71e14b015709528a5ff523b86 /src/dhcpcd.c | |
| parent | ba04408c085ddf6b626352dc34f95dace33a78d2 (diff) | |
| download | dhcpcd-21d355135157335a8d85a14412c006dff3eb41ff.tar.xz | |
options: Allow duid to take a value
If a value is given, it overrides /var/db/dhcpcd/duid.
Diffstat (limited to 'src/dhcpcd.c')
| -rw-r--r-- | src/dhcpcd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 71575d1d..7727a48e 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -841,13 +841,17 @@ dhcpcd_initduid(struct dhcpcd_ctx *ctx, struct interface *ifp) { char buf[DUID_LEN * 3]; - if (ctx->duid != NULL) + if (ctx->duid != NULL) { + if (ifp == NULL) + goto log; return; + } duid_init(ctx, ifp); if (ctx->duid == NULL) return; +log: loginfox("DUID %s", hwaddr_ntoa(ctx->duid, ctx->duid_len, buf, sizeof(buf))); } |
