[quagga-dev 4348] Re: RMAP_NOMATCH vs RMAP_DENYMATCH

Brett Frankenberger rbf+quagga at panix.com
Thu Sep 7 23:29:47 BST 2006

On Thu, Sep 07, 2006 at 03:47:53PM -0600, David Stevens wrote:
> I'm looking at the route map code in lib/routemap.c and...
> I'm assuming that "RMAP_NOMATCH" means the route map does not match
> and that RMAP_DENYMATCH means the map does match and it is a "RMAP_DENY"
> map. Is that correct?

RMAP_MATCH and RMAP_NOMATCH are used by route_map_apply_match to report
whether or not a particular entry in the route map.  RMAP_PERMIT and
RMAP_DENYMATCH are used by route_map_apply to determine whether the
route was permitted or denied by the route map.
> Looking at route_map_apply(), it appears to me that the "map == NULL" case
> and the last statement in route_map_apply() should both me "RMAP_NOMAP"
> and not "RMAP_DENYMATCH" as they currently are.

A routemap always permits or denies a route.  The default action, in
the case of a nonexistant routemap or a route map where none of the
entries match the route, is to deny the route.

route_map_apply shouldn't ever return RMAP_NOMATCH; it should default
to DENY if nothing matches.

     -- Brett

More information about the Quagga-dev mailing list