projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor efficiency
[unix-history]
/
usr
/
src
/
sbin
/
routed
/
input.c
diff --git
a/usr/src/sbin/routed/input.c
b/usr/src/sbin/routed/input.c
index
058e6f7
..
a09aea9
100644
(file)
--- a/
usr/src/sbin/routed/input.c
+++ b/
usr/src/sbin/routed/input.c
@@
-1,5
+1,5
@@
#ifndef lint
#ifndef lint
-static char sccsid[] = "@(#)input.c 4.
7
(Berkeley) %G%";
+static char sccsid[] = "@(#)input.c 4.
8
(Berkeley) %G%";
#endif
/*
#endif
/*
@@
-118,10
+118,11
@@
rip_input(from, size)
}
/*
}
/*
- * Update if from gateway
, shorter, or getting
- * stale and equivalent.
+ * Update if from gateway
and different,
+ * s
horter, or getting s
tale and equivalent.
*/
*/
- if (equal(from, &rt->rt_router) ||
+ if ((equal(from, &rt->rt_router) &&
+ n->rip_metric != rt->rt_metric ) ||
(unsigned) (n->rip_metric) < rt->rt_metric ||
(rt->rt_timer > (EXPIRE_TIME/2) &&
rt->rt_metric == n->rip_metric)) {
(unsigned) (n->rip_metric) < rt->rt_metric ||
(rt->rt_timer > (EXPIRE_TIME/2) &&
rt->rt_metric == n->rip_metric)) {