优化DDoS防护相关错误提示信息

This commit is contained in:
刘祥超
2022-11-01 17:37:40 +08:00
parent 0109a27c06
commit 408357dfcf
2 changed files with 4 additions and 1 deletions

View File

@@ -91,6 +91,9 @@ func (this *DDoSProtectionManager) Apply(config *ddosconfigs.ProtectionConfig) e
} }
if nftablesInstance == nil { if nftablesInstance == nil {
if config == nil || !config.IsOn() {
return nil
}
return errors.New("nftables instance should not be nil") return errors.New("nftables instance should not be nil")
} }