<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Markus,<br>
<br>
It look like to work fine. Here a test I've done :<br>
<br>
olsr subnet is 10.255.255.0/24<br>
FreeBSD node is 10.255.255.201<br>
openwrt node 10.255.255.101 have hna 192.168.101.0/24<br>
openwrt node 10.255.255.102 have hna 192.168.102.0/24<br>
openwrt node 10.255.255.103 have hna 192.168.103.0/24<br>
<br>
I deleted hna 192.168.103.0/24 from 10.255.255.103 and added it to
10.255.255.102 instead. Here the output from olsr with nofork :<br>
<br>
set netmask to 32### Route debug add_Del_route:<br>
KERN: 1 Deleting 192.168.102.0/24 via 10.255.255.102<br>
check for gateway 192.168.102.0 != 10.255.255.102add GATEWAY to
flags<br>
gateway ip added<br>
set netmask to 24### Route debug add_Del_route:<br>
KERN: 0 Adding 10.255.255.103/32 from 10.255.255.103 via
10.255.255.103, cost 8.793, metric 1, v 2510<br>
add HOST to flags<br>
check for gateway 10.255.255.103 != 10.255.255.103mac as gateway<br>
rtfhost<br>
set netmask to 32### Route debug add_Del_route:<br>
KERN: 0 Adding 10.255.255.102/32 from 10.255.255.102 via
10.255.255.102, cost 8.793, metric 1, v 2514<br>
add HOST to flags<br>
check for gateway 10.255.255.102 != 10.255.255.102mac as gateway<br>
rtfhost<br>
set netmask to 32### Route debug add_Del_route:<br>
KERN: 1 Adding 192.168.102.0/24 from 10.255.255.102 via
10.255.255.102, cost 8.793, metric 1, v 2514<br>
check for gateway 192.168.102.0 != 10.255.255.102add GATEWAY to
flags<br>
gateway ip added<br>
set netmask to 24### Route debug add_Del_route:<br>
KERN: 1 Adding 192.168.103.0/24 from 10.255.255.102 via
10.255.255.102, cost 8.793, metric 1, v 2514<br>
check for gateway 192.168.103.0 != 10.255.255.102add GATEWAY to
flags<br>
gateway ip added<br>
set netmask to 24<br>
<br>
routing table before hna change :<br>
<br>
Internet:<br>
Destination Gateway Flags Refs Use Netif
Expire<br>
default 216.113.32.254 UGS 0 11523 re0<br>
10.255.255.0 link#3 U 9 40 em0<br>
10.255.255.101/32 00:30:18:a0:f5:35 U 0 49 em0<br>
10.255.255.102/32 00:30:18:a0:f5:35 U 0 1 em0<br>
10.255.255.103/32 00:30:18:a0:f5:35 U 0 2 em0<br>
olsrtestfbsd link#3 UHS 0 0 lo0<br>
localhost link#7 UH 0 0 lo0<br>
192.168.3.0 link#1 U 2 1456 re0<br>
192.168.3.223 link#1 UHS 0 0 lo0<br>
192.168.101.0 10.255.255.101 UG 0 0 em0<br>
192.168.102.0 10.255.255.102 UG 0 0 em0<br>
192.168.103.0 10.255.255.103 UG 0 0 em0<br>
216.113.32.248/29 link#1 U 0 0 re0<br>
216.113.32.250 link#1 UHS 0 0 lo0<br>
<br>
routing table after hna change :<br>
<br>
Internet:<br>
Destination Gateway Flags Refs Use Netif
Expire<br>
default 216.113.32.254 UGS 0 11536 re0<br>
10.255.255.0 link#3 U 12 52 em0<br>
10.255.255.101/32 00:30:18:a0:f5:35 U 0 49 em0<br>
10.255.255.102/32 00:30:18:a0:f5:35 U 0 0 em0<br>
10.255.255.103/32 00:30:18:a0:f5:35 U 0 0 em0<br>
olsrtestfbsd link#3 UHS 0 0 lo0<br>
localhost link#7 UH 0 0 lo0<br>
192.168.3.0 link#1 U 4 2065 re0<br>
192.168.3.223 link#1 UHS 0 0 lo0<br>
192.168.101.0 10.255.255.101 UG 0 0 em0<br>
192.168.102.0 10.255.255.102 UG 0 0 em0<br>
192.168.103.0 10.255.255.102 UG 0 0 em0<br>
216.113.32.248/29 link#1 U 0 0 re0<br>
216.113.32.250 link#1 UHS 0 0 lo0<br>
<br>
I will try it in a production environnement with 25 neighbors and
around 600 or 700 dynamic route to check if it's still right.<br>
<br>
Did you make a patch ? I know it's a ugly fix but I would like to
also try it on OpenBSD to check if the problem is really the same.<br>
<br>
Thanks<br>
<br>
Michel<br>
<br>
Le 2011-11-16 19:47, Markus Kittenberger a écrit :
<blockquote
cite="mid:CAKNLPN+dnggzR7i=aDeGrYUWE22OQDD8n8OFnoCN9A-df1FKNg@mail.gmail.com"
type="cite">hmm i think i found the bug, and added a ugly bugfix
right on your testsystem
<div>(in /usr/ports/net/olsrd/work/olsrd-0.6.2/) </div>
<div>and did an gmake & gmake install afterwards</div>
<div><br>
</div>
<div>infact the bug is not even really in the bsd specific code,..
#1</div>
<div>(but i added (beside many debugoutput on stderr) a
fix/workaround there, until i decided how to really fix this,..)</div>
<div><br>
</div>
<div>
<div>please test if it really works now, </div>
</div>
<div><br>
</div>
<div>Markus</div>
<div><br>
</div>
<div>#1 it seems that (os_unspecific) olsr_rt_flags() function
does not correctly set the GATEWAY flag,... (it comes to
different conslusion if a route gets deleted as if its added *G)</div>
<div><br>
</div>
<div>
and as the bsd code not only passes this flag to the kernel
(where a wrong flag would be bad anyways)</div>
<div>but also checks for this flag itself, to decide whether it
includes the gateway ip to the routing socket message or not, it
fails to delete the route,.. </div>
<div><br>
</div>
<div>as afair the linux specific routing code of olsrd evaluates
itself if there is a gateway, and towards kernel anyways always
set RTA_GATEWAY routing flag (at least since ON_LINK) </div>
<div>so it is not affected by this bug of the olsr_rt_flags()
function,..</div>
<div><br>
</div>
<div>
<div class="gmail_quote">On Wed, Nov 16, 2011 at 12:10 AM,
Michel Blais <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:michel@targointernet.com">michel@targointernet.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Hi Markus,<br>
<br>
I build a small network with<br>
3 OLSR v0.6.1 on OpenWRT (paquage from opkg install)<br>
1 OLSR v0.6.1 on FreeBSD 8.2 (paquagee from freebsd install
with pkg_add -r)<br>
<br>
I saw those errors on the FreeBSD with -nofork<br>
<br>
Cannot write to routing socket: (rtm_errno= 0x0) (last error
message: No such process)<br>
Failed on Deleting <a moz-do-not-send="true"
href="http://10.255.255.102/32" target="_blank">10.255.255.102/32</a>
via 10.255.255.101<br>
<br>
Cannot write to routing socket: (rtm_errno= 0x0) (last error
message: No such process)<br>
Failed on Deleting <a moz-do-not-send="true"
href="http://10.255.255.103/32" target="_blank">10.255.255.103/32</a>
via 10.255.255.102<br>
<br>
Cannot write to routing socket: (rtm_errno= 0x0) (last error
message: No such process)<br>
Failed on Deleting <a moz-do-not-send="true"
href="http://10.255.255.101/32" target="_blank">10.255.255.101/32</a>
via 10.255.255.103<br>
<br>
If I look at the routing table<br>
<br>
olsrtestfbsd# netstat -r<br>
Routing tables<br>
<br>
Internet:<br>
Destination Gateway Flags Refs Use
Netif Expire<br>
10.255.255.0 link#3 U 1 0
em0<br>
olsrtestfbsd 10.255.255.103 UGH 0 0
em0 =><br>
<a moz-do-not-send="true" href="http://10.255.255.101/32"
target="_blank">10.255.255.101/32</a> 00:30:18:a0:f5:35
U 0 0 em0<br>
10.255.255.102 10.255.255.103 UGH 0 0
em0 =><br>
<a moz-do-not-send="true" href="http://10.255.255.102/32"
target="_blank">10.255.255.102/32</a> 00:30:18:a0:f5:35
U 0 0 em0<br>
10.255.255.103 10.255.255.102 UGH 0 0
em0 =><br>
<a moz-do-not-send="true" href="http://10.255.255.103/32"
target="_blank">10.255.255.103/32</a> 00:30:18:a0:f5:35
U 0 0 em0<br>
10.255.255.201 link#3 UHS 0 0
lo0<br>
localhost link#7 UH 0 2
lo0<br>
192.168.3.0 link#1 U 1 1336
re0<br>
192.168.3.223 link#1 UHS 0 0
lo0<br>
<br>
If I look at http_info :<br>
<br>
Destination Gateway Metric ETX Interface<br>
10.255.255.101 10.255.255.101 1 1.000 em0<br>
10.255.255.102 10.255.255.102 1 1.000 em0<br>
10.255.255.103 10.255.255.103 1 1.000 em0<br>
<br>
So the same error happen on FreeBSD. I will try to check if
older version can be install with pkg_add or build them.<br>
<br>
I could give acces tomorrow to the FreeBSD if somebody want
to test it.<span class="HOEnZb"><font color="#888888"><br>
<br>
Michel<br>
</font></span></blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Michel Blais
Administrateur réseau / Network administrator
Targo Communications
<a class="moz-txt-link-abbreviated" href="http://www.targo.ca">www.targo.ca</a>
514-448-0773
</pre>
</body>
</html>