aboutsummaryrefslogtreecommitdiffstats
path: root/syz-manager
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-01-13 19:37:36 +0100
committerAleksandr Nogikh <nogikh@google.com>2025-01-14 11:05:01 +0000
commit102e004727c29072e43dd2c85db7716bdb8d6878 (patch)
treea6a6c68841a7ddbde6998489b2a47677dabbdd4f /syz-manager
parent0dce2409ff7389009070e025857c71f752d814e6 (diff)
all: support empty HTTP config
We don't really need an HTTP server when running syz-manager during kernel image testing and when running syz-diff automatically. Don't require the config to be set and don't start the HTTP server in this case.
Diffstat (limited to 'syz-manager')
-rw-r--r--syz-manager/manager.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/syz-manager/manager.go b/syz-manager/manager.go
index 1c86668f1..e093f7732 100644
--- a/syz-manager/manager.go
+++ b/syz-manager/manager.go
@@ -282,6 +282,7 @@ func RunManager(mode *Mode, cfg *mgrconfig.Config) {
mgr.cfg.Procs = 1
}
mgr.http = &manager.HTTPServer{
+ // Note that if cfg.HTTP == "", we don't start the server.
Cfg: cfg,
StartTime: time.Now(),
CrashStore: mgr.crashStore,
@@ -355,7 +356,9 @@ func RunManager(mode *Mode, cfg *mgrconfig.Config) {
mgr.http.TogglePause = mgr.pool.TogglePause
ctx := vm.ShutdownCtx()
- go mgr.http.Serve()
+ if mgr.cfg.HTTP != "" {
+ go mgr.http.Serve()
+ }
go mgr.trackUsedFiles()
go mgr.processFuzzingResults(ctx)
mgr.pool.Loop(ctx)
@@ -1437,6 +1440,9 @@ func (mgr *Manager) CoverageFilter(modules []*vminfo.KernelModule) []uint64 {
}
func publicWebAddr(addr string) string {
+ if addr == "" {
+ return ""
+ }
_, port, err := net.SplitHostPort(addr)
if err == nil && port != "" {
if host, err := os.Hostname(); err == nil {