diff options
| author | Roy Marples <roy@marples.name> | 2020-10-07 14:23:23 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-10-07 14:23:23 +0100 |
| commit | e2caea689681e9e2f9291290939390ea7d12b2f9 (patch) | |
| tree | 853f8eede80052f3172c5f31c2ef91738f87e145 /src/if.c | |
| parent | 76b513c6ebf26ae0dfd320f742b945db76466ac0 (diff) | |
| download | dhcpcd-e2caea689681e9e2f9291290939390ea7d12b2f9.tar.xz | |
if: always log about unsupported interface types in debug
Diffstat (limited to 'src/if.c')
| -rw-r--r-- | src/if.c | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -422,11 +422,14 @@ if_check_arphrd(struct interface *ifp, unsigned int active, bool if_noconf) } break; default: - if (if_noconf) - active = IF_INACTIVE; - if (active) - logwarnx("%s: unsupported interface type 0x%.2x", - ifp->name, ifp->hwtype); + if (active) { + if (if_noconf) + active = IF_INACTIVE; + i = active ? LOG_WARNING : LOG_DEBUG; + logmessage(i, "%s: unsupported" + " interface type 0x%.2x", + ifp->name, ifp->hw_type); + } break; } @@ -632,12 +635,14 @@ if_discover(struct dhcpcd_ctx *ctx, struct ifaddrs **ifaddrs, #endif default: /* Don't allow unless explicit */ - if (if_noconf) - active = IF_INACTIVE; - if (active) - logwarnx("%s: unsupported" + if (active) { + if (if_noconf) + active = IF_INACTIVE; + i = active ? LOG_WARNING : LOG_DEBUG; + logmessage(i, "%s: unsupported" " interface type 0x%.2x", ifp->name, sdl->sdl_type); + } /* Pretend it's ethernet */ ifp->hwtype = ARPHRD_ETHER; break; |
