[Xorp-hackers] Changing the admin distance through the config file

Jean Michel MacKay mackay.jm at gmail.com
Fri Dec 14 06:52:44 PST 2012


Hey everybody,
I'm currently working on allowing admin distances to be changed through the
config file.

I've mapped the token 'distance', currently only in RIP and OSPF, to the
RIB's set_protocol_admin_distance. Now the origin table is already created
once set_protocol_admin_distance is called, so it fails. I assume that it
fails because you shouldn't change the AD once the origin table exists,
since it would comprise all the merge tables using that origin table. Is
this the case?

How I got around this was to implement change_admin_distance in the class
OriginTable and only allow the AD to be changed if there are no routes in
the OriginTable. Since that should keep the integrity of the merge tables.

Does this sound right? I'm worried that I'm missing something about the
design and this is not a proper solution.

I'll clean up the code and send a patch if you want it.

Cheers,
JM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20121214/3cd3a096/attachment.html 


More information about the Xorp-hackers mailing list