[quagga-dev 5263] Re: prefix-list logic

paul at clubi.ie paul at clubi.ie
Sat Feb 23 17:20:17 GMT 2008


Hi Anthony,

On Wed, 13 Feb 2008, Anthony R. Mattke wrote:

> I see in zebra 0.90 there were changes made to the prefix lenth ranges.

That's fairly old.

> ** prefix-list rule is slightly changed.  The rule of "len <= ge-value
> <= le-value" is changed to "len < ge-value <= le-value".
>
> Can anyone tell me why this is the case?

Why do you think this is the case? The 
lib/plis.c::prefix_list_entry_match code in Quagga has:

   /* In case of le nor ge is specified, exact match is performed. */
   if (! pentry->le && ! pentry->ge)
     {
       if (pentry->prefix.prefixlen != p->prefixlen)
         return 0;
     }
   else
     {
       if (pentry->le)
         if (p->prefixlen > pentry->le)
           return 0;

       if (pentry->ge)
         if (p->prefixlen < pentry->ge)
           return 0;
     }

regards,
-- 
Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
Fortune:
Matter will be damaged in direct proportion to its value.



More information about the Quagga-dev mailing list