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

Jean Michel MacKay mackay.jm at gmail.com
Fri Dec 14 12:25:49 PST 2012


Here is the patch.

Cheers,
JM

On Fri, Dec 14, 2012 at 12:25 PM, Ben Greear <greearb at candelatech.com>wrote:

> 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<http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers>
>>
>>
>
> --
> Ben Greear <greearb at candelatech.com>
> Candela Technologies Inc  http://www.candelatech.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20121214/93e74080/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: admin_distance.patch
Type: application/octet-stream
Size: 2455 bytes
Desc: not available
Url : http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20121214/93e74080/attachment.obj 


More information about the Xorp-hackers mailing list