fix: only start helper when enable tcp ts and ipid

This commit is contained in:
SunBK201 2025-11-27 20:34:58 +08:00
parent 06b58de44b
commit aac081905e
2 changed files with 2 additions and 5 deletions

View File

@ -124,9 +124,6 @@ func (s *NfqueueServer) Start() error {
if err != nil {
return fmt.Errorf("nf.RegisterWithErrorFunc: %w", err)
}
<-ctx.Done()
return nil
}

View File

@ -45,9 +45,9 @@ func (s *Server) Start() (err error) {
slog.Error("Firewall.Setup", slog.Any("error", err))
return err
}
if s.cfg.SetTTL || s.cfg.DelTCPTimestamp || s.cfg.SetIPID {
if s.cfg.DelTCPTimestamp || s.cfg.SetIPID {
slog.Info("Packet modification features enabled")
go s.nfqServer.Start()
return s.nfqServer.Start()
}
return nil
}