[Olsr-dev] Patch Orgy Syncup

Sven-Ola Tuecke (spam-protected)
Mon Aug 20 12:08:16 CEST 2007


Hi Bernd,

are you shure, you haven't the same errors with the ioctl() stuff? This 
looks like a tap device without a network route. Some background:

Normally, if you "ifconfig [xxx] ipaddr mask", a network route is added to 
the nic from the kernel. Example:

styx:~ # ip addr add 12.0.0.0/26 dev eth0
styx:~ # route -n | grep ^12
12.0.0.0        0.0.0.0         255.255.255.192 U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

The olsrd sets the routes in any arbitrary order. No special sorting. This 
means: AddRt() and DelRt() are called in the order which is determined by 
the internal datastructure (the edges and vertex stuff). It is possible to 
remove the route. For some ifaces such as "lo" the kernel does not maintain 
this automatic network route IMO. For our example:

styx:~ # ip route del 12.0.0.0/26 dev eth0
styx:~ # route -n | grep ^12
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

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. 
You may also notice some ARP requests to 12.3.2.1...

Of course there is plenty of space for misunderstanding or bugs as usual 
<ggg>.

// Sven-Ola

"Bernd Petrovitsch" <(spam-protected)> schrieb im Newsbeitrag 
news:(spam-protected)
> On Fri, 2007-08-03 at 14:02 +0200, Sven-Ola Tuecke wrote:
> [...]
>> 130-olsrd-policy-routing.patch
>>   Reworked this one to discard GPL helper functions. Also checked IPv6 
>> and
>>   re-included the IPC hookup. This should be ready for inclusion now. The
>>   patch adds a "RtTable [number]" for /etc/olsrd.conf which is simply the
>> Linux
>>   policy routing table to use. Defaults to 254 (== main). Ah - the patch
>> should
>>   apply without the 120-routing-cleanup.
>
> If I add this and error output similar to the previous version, I get on
> my node:
> ----  snip  ----
> (netlink)Adding route with metric 1 to 193.238.156.50/255.255.255.255 via 
> 193.238.156.50/tap0 into table 42: 36
> (netlink)Adding route with metric 1 to 193.238.156.1/255.255.255.255 via 
> 193.238.156.50/tap0 into table 42: -1 Network is unreachable
> (netlink)Adding route with metric 2 to 193.238.156.205/255.255.255.255 via 
> 193.238.156.50/tap0 into table 42: -1 Network is unreachable
> (netlink)Adding route with metric 2 to 193.238.156.192/255.255.255.255 via 
> 193.238.156.50/tap0 into table 42: -1 Network is unreachable
> ----  snip  ----
> What I'm doing wrong?
> Do I need to do something else?
>
> 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