[Olsr-dev] Patch for dyn_gw plugin

Teco Boot (spam-protected)
Wed Feb 3 11:23:42 CET 2010


Hi Henning,

I repaired the dyn_gw and performed basic testing.
Can you add this in the repository?


You asked:
>Anyone else has an idea why the dyn_gw plugin is 
>usable for some Freifunk usecases ?

Maybe someone wants to publish the default gateway conditionally.
The ping check is a nice to have. 

I am going to use a more sophisticated check. That is why I don't
need the ping test. The Ping parameter is not mandatory, but the 
thread is set up.
Put effort in removal of the unused thread?

Teco.



--- /home/nbs/olsrd_dyn_gw original/olsrd_dyn_gw.c      2010-02-03
11:01:09.000000000 +0100
+++ olsrd_dyn_gw.c      2010-01-30 16:50:33.000000000 +0100
@@ -168,14 +168,15 @@
     return 1;
   }
   //printf("GOT: %s(%08x)",inet_ntoa(foo_addr),foo_addr.s_addr);
-  if (inet_pton(olsr_cnf->ip_version, s_netaddr, &temp_netmask) <= 0) {
-    OLSR_PRINTF(0, "Illegal netmask \"%s\"", s_netaddr);
+  if (inet_pton(olsr_cnf->ip_version, s_mask, &temp_netmask) <= 0) {
+    OLSR_PRINTF(0, "Illegal netmask \"%s\"", s_mask);
     return 1;
   }
   //printf("/%s(%08x)\n",inet_ntoa(foo_addr),foo_addr.s_addr);
   //printf("%s():got->%s/%s\n",__func__,olsr_ip_to_string((union
olsr_ip_addr *)&));
   the_hna_list = add_to_hna_list(the_hna_list, &temp_net,
olsr_netmask_to_prefix(&temp_netmask));
-  if (the_hna_list != NULL) {
+  if (the_hna_list == NULL) {
+    OLSR_PRINTF(0, "Error adding HNA in HNA-list");
     return 1;
   }
   return 0;







More information about the Olsr-dev mailing list