rtconfig configureRouter bug?

Oliver Graf ograf at rz-online.net
Wed Oct 13 06:32:07 UTC 2010


Hi!

While experimenting with rtconfig I stumbled over a problem where an 
@rtconfig import would generate correct config, but a configureRouter on 
an inet-rtr object, defining the same peering as the @rtconfig import 
statement does results in no output.

I traced the problem and it seems that while the @rtconfig import will 
match the local address, the configureRouter version fails in this 
comparison, cause the mask of the local interface is compared, too.

Steps to reproduce (objects attached):
rtconfig -f as.txt -f rtr.txt
@rtconfig import AS1 22.33.44.11 AS2 22.33.44.22
@rtconfig configureRouter a.test.net

The problem is in src/irr/autnum.hh static bool isPeeringMatching(Filter 
*f, const MPPrefix *ip)
if (typeid(*f) == typeid(FilterRouter)) {
   return ((*((FilterRouter *) f)->ip) == *ip);
}

This will match for the plain import line with (my debug output follows):
   iPM FR 22.33.44.22/32 == 22.33.44.22/32 -> True
but it will fail for the configureRouter line with
   iPM FR 22.33.44.11/32 == 22.33.44.11/24 -> False
cause the inet-rtr a.test.com has it's ifaddr configured with a masklen 
of 24.

Is this a bug or did I make an error in my as/inet-rtr definition?

Regards,
   Oliver.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: as.txt
URL: <https://lists.isc.org/pipermail/irrtoolset/attachments/20101013/5ccc1f57/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rtr.txt
URL: <https://lists.isc.org/pipermail/irrtoolset/attachments/20101013/5ccc1f57/attachment-0001.txt>


More information about the irrtoolset mailing list