diff --git a/targets.cc b/targets.cc index 21426e9d2..2488bbd5b 100644 --- a/targets.cc +++ b/targets.cc @@ -382,12 +382,11 @@ static bool target_needs_new_hostgroup(const HostGroupState *hs, const Target *t return false; /* There are no restrictions on non-root scans. */ - if (!(o.af() == AF_INET && o.isr00t)) + if (!(o.af() == AF_INET && o.isr00t && target->deviceName() != NULL)) return false; /* Different interface name? */ if (hs->hostbatch[0]->deviceName() != NULL && - target->deviceName() != NULL && strcmp(hs->hostbatch[0]->deviceName(), target->deviceName()) != 0) { return true; }