Skip to content

Commit f69c8c1

Browse files
committed
syz-manager: add a check for localhost
If localhost is not resolvable on a system, we might run into a loop (for example in vm/vmimpl/UnusedTCPPort) or fail later. Since syzkaller uses localhost (and not something like 127.0.0.1) it's way better to notify user earlier if their 'localhost' is not configured correctly. Signed-off-by: Ivan Gulakov <gulakov@amazon.de>
1 parent d3ccff6 commit f69c8c1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

syz-manager/manager.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,11 @@ func main() {
242242
}
243243

244244
func RunManager(mode *Mode, cfg *mgrconfig.Config) {
245+
// localhost is going to be used later, notify users
246+
if _, err := net.LookupHost("localhost"); err != nil {
247+
log.Fatalf("'localhost' is not resolving on this system, configure your DNS resolver")
248+
}
249+
245250
var vmPool *vm.Pool
246251
if !cfg.VMLess {
247252
var err error

0 commit comments

Comments
 (0)