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

Ben Greear greearb at candelatech.com
Fri Dec 14 09:25:50 PST 2012


On 12/14/2012 06:52 AM, Jean Michel MacKay wrote:
> 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.

A patch is welcome, but I don't have time to look into this in detail
right now.

Maybe someone else will have more time.

Thanks,
Ben

>
> Cheers,
> JM
>
>
> _______________________________________________
> Xorp-hackers mailing list
> Xorp-hackers at icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
>


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list