]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ripd.c: correct bug that allowed route learnt through RIP to take precedence over...
authorvincent <vincent>
Mon, 30 Jan 2006 18:12:42 +0000 (18:12 +0000)
committervincent <vincent>
Mon, 30 Jan 2006 18:12:42 +0000 (18:12 +0000)
ripd/ChangeLog
ripd/ripd.c

index c979a11df4b58f16cdd50ba065e1e75c80b00c44..d795509efe2874052dcfe5db61c71abf99e088be 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-30 Alain Ritoux <alain.ritoux@6wind.com>
+
+        * ripd.c: correct bug that allowed route learnt through RIP to take
+         precedence over connectd routes
+
 2006-01-19 Paul Jakma <paul.jakma@sun.com>
 
         * ripd.c: (main) return from main, not exit, cause it annoys SOS.
index 40db33f5e461b066a521a7a36f08bb6673070c71..c8aa52215740bd938430387e9dc5036b26f5066e 100644 (file)
@@ -486,7 +486,9 @@ rip_rte_process (struct rte *rte, struct sockaddr_in *from,
           new_dist = rip_distance_apply (&rinfotmp);
           new_dist = new_dist ? new_dist : ZEBRA_RIP_DISTANCE_DEFAULT;
           old_dist = rinfo->distance;
-          old_dist = old_dist ? old_dist : ZEBRA_RIP_DISTANCE_DEFAULT;
+          /* Only connected routes may have a valid NULL distance */
+          if (rinfo->type != ZEBRA_ROUTE_CONNECT)
+            old_dist = old_dist ? old_dist : ZEBRA_RIP_DISTANCE_DEFAULT;
           /* If imported route does not have STRICT precedence, 
              mark it as a ghost */
           if (new_dist > old_dist