[Babel-users] the routing atomic update wet paint - because *I* care

Henning Rogge hrogge at gmail.com
Mon Apr 6 08:54:58 UTC 2015


On Mon, Apr 6, 2015 at 8:43 AM, Dave Taht <dave.taht at gmail.com> wrote:
> Is there anywhere a good reference to netlink?

I mostly use the source code of the "ip route" command. I don't think
anyone ever got to the point writing good documentation.

Be happy, you could be working with the multicast routing API. ;)

> On Mon, Mar 16, 2015 at 11:32 AM, Henning Rogge <hrogge at gmail.com> wrote:
>> On Mon, Mar 16, 2015 at 7:25 PM, Dave Taht <dave.taht at gmail.com> wrote:
>>> got code?
>>
>> I just used the same code I use for IPv4 (which has been working for
>> atomic replacement for ages).
>>
>> I got confused when someone reported "multiple IPv6 routes" which I
>> could not reproduce.
>>
>> http://olsr.org/git/?p=oonf.git;a=blob;f=src-plugins/subsystems/os_linux/os_routing_linux.c;h=4194fd04f8f259b686a1343cc906fc8649c6a7b6;hb=master
>>
>> If I understand it correctly you just need to set the routes with
>> NLM_F_CREATE | NLM_F_REPLACE to get the atomic replacement.
>
> Well, I tried a naive approach to that for babel after looking over
> the olsr code and did not succeed at this level. I am curious as to
> whether this sequence of events works for olsr, in the first place.
>
> start it up on two machines
> add an ipv6 address on machine A)
> wait for it to show up in the routing table for B)
> delete the ipv6 address on machine A)
> See if it is unreachable, then gone on B)

I can do some tests tomorrow when I am back at work.

> What happens with the patch below (and variants), is that babel thinks
> it has modified
> the route but it is not gone. I dont understand how the operation
> could work in the first place
> actually... don´t you have to feed both the old route and the new into
> the netmsg?

No...

I think the "unique key" for the route is destination, routing table
and metric. The metric part is important, if you put the "routing
protocol path cost" into the route, atomic replacement will not work.

With these three the same, it should work... at least it "worked for
me" in a current ubuntu VM.

Henning



More information about the Babel-users mailing list