[quagga-dev 4347] RMAP_NOMATCH vs RMAP_DENYMATCH

David Stevens dlstevens at us.ibm.com
Thu Sep 7 22:47:53 BST 2006


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?

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.

Am I missing something? If not, patch below.

                                                +-DLS

[in-line for viewing, attached for applying, since my mailer mangles 
whitespace]

--- quagga-0.99.4/lib/routemap.c        2005-11-16 14:55:08.000000000 
-0800
+++ quagga-0.99.4-dlsZ6/lib/routemap.c  2006-09-07 14:43:04.000000000 
-0700
@@ -784,7 +784,7 @@ route_map_apply (struct route_map *map, 
     }
 
   if (map == NULL)
-    return RMAP_DENYMATCH;
+    return RMAP_NOMATCH;
 
   for (index = map->head; index; index = index->next)
     {
@@ -856,7 +856,7 @@ route_map_apply (struct route_map *map, 
         }
     }
   /* Finally route-map does not match at all. */
-  return RMAP_DENYMATCH;
+  return RMAP_NOMATCH;
 }
 
 void


-------------- next part --------------
A non-text attachment was scrubbed...
Name: rmap.patch
Type: application/octet-stream
Size: 542 bytes
Desc: not available
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20060907/ecd1f979/attachment-0001.obj>


More information about the Quagga-dev mailing list