optimize: allow to bind nothing

This commit is contained in:
mzz2017
2023-02-27 14:57:00 +08:00
parent 2d8ce4a096
commit a9709d2a57
3 changed files with 1 additions and 5 deletions

View File

@ -150,7 +150,7 @@ func newControlPlane(log *logrus.Logger, bpf interface{}, conf *config.Config) (
}
if len(conf.Global.LanInterface) == 0 && len(conf.Global.WanInterface) == 0 {
return nil, fmt.Errorf("LanInterface and WanInterface cannot both be empty")
log.Warnln("No binding interface.")
}
// Deep copy a conf to avoid modification.