minor fixes
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Sat, 16 May 1987 04:37:16 +0000 (20:37 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Sat, 16 May 1987 04:37:16 +0000 (20:37 -0800)
SCCS-vsn: sbin/routed/input.c 5.11
SCCS-vsn: sbin/routed/tables.c 5.9

usr/src/sbin/routed/input.c
usr/src/sbin/routed/tables.c

index b9ac834..7a549d2 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)input.c    5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)input.c    5.11 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -183,7 +183,7 @@ rip_input(from, size)
                            (RTS_INTERNAL|RTS_INTERFACE)) {
                                rt = rtfind(&n->rip_dst);
                                if (rt && equal(from, &rt->rt_router) &&
                            (RTS_INTERNAL|RTS_INTERFACE)) {
                                rt = rtfind(&n->rip_dst);
                                if (rt && equal(from, &rt->rt_router) &&
-                                   rt->rt_metric == n->rip_metric)
+                                   rt->rt_metric <= n->rip_metric)
                                        continue;
                                if (n->rip_metric < HOPCNT_INFINITY)
                                    rtadd(&n->rip_dst, from, n->rip_metric, 0);
                                        continue;
                                if (n->rip_metric < HOPCNT_INFINITY)
                                    rtadd(&n->rip_dst, from, n->rip_metric, 0);
index beed3a0..ba5706e 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)tables.c   5.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)tables.c   5.9 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -205,8 +205,9 @@ rtchange(rt, gate, metric)
                                "changing route from interface %s (timed out)",
                                rt->rt_ifp->int_name);
                }
                                "changing route from interface %s (timed out)",
                                rt->rt_ifp->int_name);
                }
-               if (doioctl || delete) {
+               if (doioctl || delete)
                        oldroute = rt->rt_rt;
                        oldroute = rt->rt_rt;
+               if (doioctl) {
                        rt->rt_router = *gate;
                        rt->rt_ifp = if_ifwithdstaddr(&rt->rt_router);
                        if (rt->rt_ifp == 0)
                        rt->rt_router = *gate;
                        rt->rt_ifp = if_ifwithdstaddr(&rt->rt_router);
                        if (rt->rt_ifp == 0)