SCCS-vsn: sbin/routed/input.c 4.11
-static char sccsid[] = "@(#)input.c 4.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)input.c 4.11 (Berkeley) %G%";
{
struct rt_entry *rt;
struct netinfo *n;
{
struct rt_entry *rt;
struct netinfo *n;
+ struct interface *ifp, *if_ifwithdstaddr();
int newsize;
struct afswitch *afp;
int newsize;
struct afswitch *afp;
* Update if from gateway and different,
* shorter, or getting stale and equivalent.
*/
* Update if from gateway and different,
* shorter, or getting stale and equivalent.
*/
- if ((equal(from, &rt->rt_router) &&
- n->rip_metric != rt->rt_metric ) ||
- (unsigned) (n->rip_metric) < rt->rt_metric ||
+ if (equal(from, &rt->rt_router)) {
+ if (n->rip_metric != rt->rt_metric)
+ rtchange(rt, from, n->rip_metric);
+ rt->rt_timer = 0;
+ } else if ((unsigned) (n->rip_metric) < rt->rt_metric ||
(rt->rt_timer > (EXPIRE_TIME/2) &&
rt->rt_metric == n->rip_metric)) {
rtchange(rt, from, n->rip_metric);
(rt->rt_timer > (EXPIRE_TIME/2) &&
rt->rt_metric == n->rip_metric)) {
rtchange(rt, from, n->rip_metric);