}
for (i = 0; i < ctx->ifdc; i++)
- if (!fnmatch(ctx->ifdv[i], spec.devname, 0))
+ if (fnmatch(ctx->ifdv[i], spec.devname, 0) == 0)
break;
if (i < ctx->ifdc)
active = IF_INACTIVE;
+ for (i = 0; i < ctx->ifc; i++)
+ if (fnmatch(ctx->ifv[i], spec.devname, 0) == 0)
+ break;
+ if (ctx->ifc && i == ctx->ifc)
+ active = IF_INACTIVE;
for (i = 0; i < ctx->ifac; i++)
- if (!fnmatch(ctx->ifav[i], spec.devname, 0))
+ if (fnmatch(ctx->ifav[i], spec.devname, 0) == 0)
break;
if (ctx->ifac && i == ctx->ifac)
active = IF_INACTIVE;