Fix checking against the default routing metric
authorFerry Huberts <f.huberts@mindef.nl>
Thu, 26 Aug 2010 11:52:29 +0000 (13:52 +0200)
committerFerry Huberts <f.huberts@mindef.nl>
Thu, 26 Aug 2010 11:54:24 +0000 (13:54 +0200)
Signed-off-by: Ferry Huberts <f.huberts@mindef.nl>
Signed-off-by: Teco Boot <cc.boot@mindef.nl>
lib/dyn_gw/src/olsrd_dyn_gw.c

index 231d3a3..0209425 100644 (file)
@@ -53,6 +53,7 @@
 #include "ipcalc.h"
 #include "scheduler.h"
 #include "log.h"
+#include "routing_table.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -470,7 +471,7 @@ update_routing(void)
       continue;
     }
     
-    if ((iflags & RTF_UP) && (metric == 0)) {
+    if ((iflags & RTF_UP) && (metric != RT_METRIC_DEFAULT)) {
       hna->checked = true;
     }
   }