[Olsr-dev] Patch Orgy Syncup

Sven-Ola Tuecke (spam-protected)
Mon Aug 20 13:29:24 CEST 2007


Hi Bernd,

mmh. I will investigate once more the old routing code. If it's supposed to 
work withouth the kernel net route, maybe the "routing-cleanup" needs some 
tweaks.

If the error is ignored by the kernel with ioctl(), the routes may show up 
after a while because they're contantly updated ([...] because of metric 
changes). So the first "ip route add 12.1.3.4 via 12.3.2.1 dev eth0" may 
fail. Then after a while a "ip route add 12.3.2.1 dev eth0" happens. And 
some time after startup one of the successive "ip route add 12.1.3.4 via 
12.3.2.1 dev eth0" commands will succeed.

Not sure about the implications. E.g. to remove a route. Is the "via" route 
deleted automatically if the dependend route is removed? Or does this 
produce errors (and hence some stray routes after olsrd exits?). Need to 
dive in...

P.S. Lukily enough, the "ip route del 12.0.0.0/26 dev eth0" does not remove 
the kernel broadcast routes. So you _can_ use the 12.0.0.63 broadcast in the 
example (as well as 255.255.255.255 of course) and "ip route ls table 255" 
still shows:

local 12.0.0.0 dev eth0  proto kernel  scope host  src 12.0.0.0
broadcast 12.0.0.0 dev eth0  proto kernel  scope link  src 12.0.0.0
broadcast 12.0.0.63 dev eth0  proto kernel  scope link  src 12.0.0.0

P.P.S. to remove the auto network route is probably a workaround for 
multiple ifaces with same ip range in the system (to force ARP + 
non-hostroute-pings for a particular iface, e.g. the wifi NIC). I would 
prefer a more narrow netmask for tunnel-IP's instead. This is more clean...

// Sven-Ola

"Bernd Petrovitsch" <(spam-protected)> schrieb im Newsbeitrag 
news:(spam-protected)
> On Mon, 2007-08-20 at 12:08 +0200, Sven-Ola Tuecke wrote:
> [...]
>> are you shure, you haven't the same errors with the ioctl() stuff? This
>
> Yes - at least I see the routes.
> Same olsrd.conf (except "RtTable" parameter - and putting "254" there
> doesn't help) on the same host.
>
>> looks like a tap device without a network route. Some background:
>
> ACK, it is that case.
>
> Do you sell your crystal ball? How much does it cost?
>
>> Normally, if you "ifconfig [xxx] ipaddr mask", a network route is added 
>> to
>> the nic from the kernel. Example:
>
> Yes. But for reasons I forgot (if I actually knew them - which I'm not
> sure - and too lazy/busy too look them up now in some ML archive) we
> (FunkFeuer) remove that route for tunnel interfaces.
>
> [...]
>> If the automatic network route is missing and olsrd tries to setup an
>> indirect route, e.g. "ip route add 12.1.3.4 via 12.3.2.1 dev eth0" 
>> _without_
>> first adding the hostroute to 12.3.2.1 the set-route-command fails. This 
>> is
>> true for rtnetlink as well as for the ioctl() stuff. You may not notice 
>> due
>> to a bug in ioctl() which simply ignores the error you see with 
>> rtnetlink.
>
> To be more precise (IIUC): The Linux kernel internally ignores that
> "error" (<philosophy>is the missing route an "error", if the kernel
> ignores it?</philosophy>) und adds the route nevertheless.
>
>> You may also notice some ARP requests to 12.3.2.1...
>
> Hmm, it seems to work now if I do not remove that route. Also with the
> ioctl() version.
>
> Hmm, I see now occasionally "File exists" errors adding a route (and "No
> such process" on deleting a route which IMHO relates to the above ones).
> Is this some kind of bug or unusal behaviour? Or "only" annoying?
>
> I'm just asking since I would add error checking and logging (somewhat
> similar to the current ioctl() case so that others have a chance of
> getting enough log output to ask intelligent questions).
>
>> Of course there is plenty of space for misunderstanding or bugs as usual
>> <ggg>.
> Not that much:-)
>
> Bernd
> -- 
> Firmix Software GmbH                   http://www.firmix.at/
> mobil: +43 664 4416156                 fax: +43 1 7890849-55
>          Embedded Linux Development and Services
>
>
>
> -- 
> Olsr-dev mailing list
> (spam-protected)
> http://lists.olsr.org/mailman/listinfo/olsr-dev 





More information about the Olsr-dev mailing list