Hello

In the previous post I told you about the new error:
ntk.network.linux.adapt.IPROUTECommandError: RTNETLINK answers: No such process

When the radar notices a new Neighbour a new microthread starts which
adds a route. In the case of the linux adapter it calls static method
'add' of class 'ntk.network.linux.adapt.Route'
When you're there the situation is this:
> /root/netsukuku/trunk/pyntk/ntk/network/linux/adapt.py(149)add()
-> cmd = Route._add_delete_cmd('add', ip, cidr, dev, gateway)
(Pdb) ip
'159.29.255.235'
(Pdb) cidr
32
(Pdb) dev
'eth0'
(Pdb) gateway
'159.29.255.235'
(Pdb) n
> /root/netsukuku/trunk/pyntk/ntk/network/linux/adapt.py(150)add()
-> iproute(cmd)
(Pdb) cmd
'route add 159.29.255.235/32 dev eth0 via 159.29.255.235 protocol ntk'
(Pdb)

The command is executed and the result is RTNETLINK answers: No such process

By experimenting with ip command I found that, when the gateway is the
same that the destination, the correct syntax is to just exclude the
'via' part.
That is, the following command does the right thing:
'route add 159.29.255.235/32 dev eth0 protocol ntk'

So, just an example:
test1:~/netsukuku/trunk/pyntk# ip route show
test1:~/netsukuku/trunk/pyntk# ip route add 159.29.255.235/32 dev eth0
via 159.29.255.235 protocol ntk
RTNETLINK answers: No such process
test1:~/netsukuku/trunk/pyntk# ip route show
test1:~/netsukuku/trunk/pyntk# ip route add 159.29.255.235/32 dev eth0
protocol ntk
test1:~/netsukuku/trunk/pyntk# ip route show
159.29.255.235 dev eth0  proto ntk  scope link
test1:~/netsukuku/trunk/pyntk# ip route add 11.22.33.44/32 dev eth0
via 159.29.255.235 protocol ntk
test1:~/netsukuku/trunk/pyntk# ip route show
11.22.33.44 via 159.29.255.235 dev eth0  proto ntk
159.29.255.235 dev eth0  proto ntk  scope link
test1:~/netsukuku/trunk/pyntk#


I'll try to produce a patch for that

Regards
--Luca

PS: I propose that when you run in debug mode (ntkd -d) it should
print out the various commands (for linux) that it executes.
_______________________________________________
Netsukuku mailing list
[email protected]
http://lists.dyne.org/mailman/listinfo/netsukuku

Reply via email to