Modify

Opened 10 years ago

Closed 10 years ago

#3102 closed defect (fixed)

olsrd dyn_gw package interval not working [ with patch ]

Reported by: ksc Owned by: developers
Priority: normal Milestone: Kamikaze 8.09 RC1
Component: packages Version:
Keywords: Cc:

Description

olsrd's dyn_gw plugin does not recognize the "interval" configuration, it floods the log with constant ping when there is a gateway and chokes the cpu along the way.

Here's a patch that works, taken from
http://lists.olsr.org/pipermail/olsr-dev/2007-November/001403.html

--- olsrd-0.5.4/lib/dyn_gw/src/olsrd_dyn_gw-orig.c      2007-10-31 15:14:47.000000000 +0100
+++ olsrd-0.5.4/lib/dyn_gw/src/olsrd_dyn_gw.c   2007-10-31 15:15:17.000000000 +0100
@@ -92,7 +92,7 @@
 
 
 /* set default interval, in case none is given in the config file */
-static int check_interval = 5;
+static double check_interval = 5;
 
 /* list to store the Ping IP addresses given in the config file */
 struct ping_list {
@@ -307,7 +307,7 @@
     struct hna_list *li;
     struct timespec remainder_spec;
     /* the time to wait in "Interval" sec (see connfig), default=5sec */
-    struct timespec sleeptime_spec  = { check_interval, 0L };
+    struct timespec sleeptime_spec  = { (int) check_interval, 0L };
 
     for(li = the_hna_list; li; li = li->next){
       /* check for gw in table entry and if Ping IPs are given also do pings */

Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

Applied in [10371], thanks !

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.