diff --git a/route/route.go b/route/route.go index d44c516e..0e3f8916 100644 --- a/route/route.go +++ b/route/route.go @@ -467,7 +467,12 @@ match: selectedRuleIndex = currentRuleIndex break match } - ruleIndex = currentRuleIndex + if ruleIndex == -1 { + ruleIndex = currentRuleIndex + } else { + ruleIndex += currentRuleIndex + } + ruleIndex++ } if !preMatch && metadata.Destination.Addr.IsUnspecified() { newBuffer, newPacketBuffers, newErr := r.actionSniff(ctx, metadata, &rule.RuleActionSniff{}, inputConn, inputPacketConn)