<p>as bernd already found out a while ago, sometimes oslrd tries to insert routes (via a gateway), but has never insert a route to the gateway before</p><p>this clearly is rejected by the kernel,..</p><p>after some debugging, checking rib and spf, i realaised that the problem only occures with neighbours having multiple interfaces (and multiple ip adresses)</p>
<p>and only when there is no mid mesage before this neighbour gets used by spf,..<br></p><p>so i created following patch which detects the alias ip of single hop neighbours on the fly,..<br></p><p>BUT: it`s a bit dirty and may break rfc, i guess!!!</p>
<p>but: since i applied the patch no error like this came up</p><p>KERN: ERROR adding <a href="http://78.41.112.7/32">78.41.112.7/32</a> from 78.41.112.7 via 193.238.159.57, cost 1.65, metric 2, v 6: No such process</p><p>
usually tousand of this happenper minute, when starting olsrd under my test conditions (=devVserver)</p><p>following patch already got pushed to tip,.</p><p>diff -r fab0ca5a173a src/mid_set.c<br></p>--- a/src/mid_set.c Sun Dec 14 20:58:33 2008 +0100<br>
+++ b/src/mid_set.c Sun Dec 14 21:31:20 2008 +0100<br>@@ -53,7 +53,6 @@<br><br> #include <stdlib.h><br><br>-static struct mid_entry *olsr_lookup_mid_entry(const union olsr_ip_addr *);<br> static void olsr_prune_mid_entries(const union olsr_ip_addr *main_addr, uint16_t mid_seqno);<br>
static void olsr_flush_mid_entries(struct tc_entry *);<br><br>@@ -221,7 +220,7 @@<br> * @param vtime the validity time<br> * @param seq the sequence number to register a new node with<br> */<br>-static struct mid_entry *<br>
+struct mid_entry *<br> olsr_insert_mid_entry(const union olsr_ip_addr *main_addr,<br> const union olsr_ip_addr *alias_addr,<br> olsr_reltime vtime,<br>@@ -286,7 +285,7 @@<br> * @param vtime the validity time<br>
* @param seq the sequence number to register a new node with<br> */<br>-static void<br>+void<br> olsr_update_mid_entry(const union olsr_ip_addr *main_addr,<br> const union olsr_ip_addr *alias_addr,<br>
olsr_reltime vtime, uint16_t mid_seqno)<br>@@ -352,7 +351,7 @@<br> * @param adr the alias address to check<br> * @return the MID address entry or NULL if not found<br> */<br>-static struct mid_entry *<br>
+struct mid_entry *<br> olsr_lookup_mid_entry(const union olsr_ip_addr *adr)<br> {<br> #if 0<br>diff -r fab0ca5a173a src/mid_set.h<br>--- a/src/mid_set.h Sun Dec 14 20:58:33 2008 +0100<br>+++ b/src/mid_set.h Sun Dec 14 21:31:20 2008 +0100<br>
@@ -89,6 +89,18 @@<br> const union olsr_ip_addr *);<br> void olsr_print_mid_set(void);<br><br>+/*used by routing upspeed hack*/<br>+struct mid_entry *olsr_lookup_mid_entry(const union olsr_ip_addr *);<br>
+void olsr_update_mid_entry(const union olsr_ip_addr *,<br>+ const union olsr_ip_addr *,<br>+ olsr_reltime,<br>+ uint16_t);<br>+struct mid_entry * olsr_insert_mid_entry(const union olsr_ip_addr *,<br>
+ const union olsr_ip_addr *,<br>+ olsr_reltime,<br>+ uint16_t);<br>+<br>+<br> #endif<br><br> /*<br>diff -r fab0ca5a173a src/tc_set.c<br>
--- a/src/tc_set.c Sun Dec 14 20:58:33 2008 +0100<br>+++ b/src/tc_set.c Sun Dec 14 21:31:20 2008 +0100<br>@@ -41,6 +41,7 @@<br> */<br><br> #include "tc_set.h"<br>+#include "mid_set.h"<br> #include "olsr.h"<br>
#include "lq_packet.h"<br> #include "net_olsr.h"<br>@@ -772,6 +773,22 @@<br><br> tc = olsr_lookup_tc_entry(&originator);<br><br>+/*learn alias ips of neighbours on the fly to speed up things!!*/<br>
+ if (msg_hops==0) {<br>+ if (!ipequal(&originator,from_addr)){<br>+ /*new alias of new neighbour are thrown in the mid table to speed up routing*/<br>+ if (olsr_validate_address(from_addr)) {<br>+ if (!olsr_lookup_mid_entry(from_addr)){<br>
+ struct ipaddr_str srcbuf, origbuf;<br>+ OLSR_PRINTF(1, "got tc from from unknown alias ip of direct neighbour: ip: %s main-ip: %s\n",<br>+ olsr_ip_to_string(&origbuf,&originator),<br>
+ olsr_ip_to_string(&srcbuf,from_addr));<br>+ olsr_insert_mid_entry(&originator, from_addr, vtime, msg_seq);<br>+ }<br>+ }<br>+ }<br>+ }<br>+<br> if (tc && 0 != tc->edge_tree.count) {<br>
if (olsr_seq_inrange_high((int)tc->msg_seq - TC_SEQNO_WINDOW,<br> tc->msg_seq,<br><br><br>