Fangliding 4 месяцев назад
Родитель
Сommit
57d7595748
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      app/router/condition.go

+ 3 - 0
app/router/condition.go

@@ -358,6 +358,9 @@ func NewProcessNameMatcher(names []string) *ProcessNameMatcher {
 }
 
 func (m *ProcessNameMatcher) Apply(ctx routing.Context) bool {
+	if len(ctx.GetSourceIPs()) == 0 {
+		return false
+	}
 	srcPort := ctx.GetSourcePort().String()
 	srcIP := ctx.GetSourceIPs()[0].String()
 	var network string