diff options
| author | Roy Marples <roy@marples.name> | 2014-05-29 11:12:09 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2014-05-29 11:12:09 +0000 |
| commit | 5b76368086cda67a399b2d5180ac4fc0c9d42fd4 (patch) | |
| tree | 478e691fbaa2c50a5e8576f19db0b0ab33c53398 /if.c | |
| parent | 362153f5b4dde84c1a56320db935becf44a2db03 (diff) | |
| download | dhcpcd-5b76368086cda67a399b2d5180ac4fc0c9d42fd4.tar.xz | |
Check naming rules before calling dev_initialized.
Diffstat (limited to 'if.c')
| -rw-r--r-- | if.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -232,10 +232,6 @@ if_discover(struct dhcpcd_ctx *ctx, int argc, char * const *argv) #endif } - /* Ensure that the interface name has settled */ - if (!dev_initialized(ctx, ifa->ifa_name)) - continue; - /* It's possible for an interface to have >1 AF_LINK. * For our purposes, we use the first one. */ TAILQ_FOREACH(ifp, ifs, next) { @@ -281,10 +277,13 @@ if_discover(struct dhcpcd_ctx *ctx, int argc, char * const *argv) if (ctx->ifac && i == ctx->ifac) continue; - if (if_vimaster(ifa->ifa_name) == 1) { + /* Ensure that the interface name has settled */ + if (!dev_initialized(ctx, p)) + continue; + + if (if_vimaster(p) == 1) { syslog(argc ? LOG_ERR : LOG_DEBUG, - "%s: is a Virtual Interface Master, skipping", - ifa->ifa_name); + "%s: is a Virtual Interface Master, skipping", p); continue; } |
