Skip to content

Commit

Permalink
router_route_intern: stop processing if a group caused a stop
Browse files Browse the repository at this point in the history
In issue #246, the optimiser created a match group, followed by a
matchall rule.  The stop from the match group did not cause an abort of
processing any further rules /after/ the group, which is wrong
behaviour.  With this commit that behaviour is fixed.
  • Loading branch information
grobian committed Jan 22, 2017
1 parent 511771e commit f9ec807
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
* **relay** A new `-O` flag allows to set the minimum rules treshold
before trying to optimise the rules.

### Bugfixes

* [Issue #246](https://github.com/grobian/carbon-c-relay/issues/246)
using `stop` in a `match` tule does not stop metrics from being
processed afterwards


# 2.5 (2017-01-09)

Expand Down
8 changes: 4 additions & 4 deletions router.c
Original file line number Diff line number Diff line change
Expand Up @@ -3184,11 +3184,11 @@ router_route_intern(
} break;
}
}

/* stop processing further rules if requested */
if (stop)
break;
}

/* stop processing further rules if requested */
if (stop)
break;
}
if (!wassent)
*blackholed = 1;
Expand Down

0 comments on commit f9ec807

Please sign in to comment.