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




