can't run timer on any interfaces if not a supplier
SCCS-vsn: sbin/routed/startup.c 5.2
SCCS-vsn: sbin/routed/timer.c 5.3
-static char sccsid[] = "@(#)startup.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)startup.c 5.2 (Berkeley) %G%";
if ((ifs.int_flags & IFF_POINTOPOINT) == 0 ||
if_ifwithaddr(&ifs.int_dstaddr) == 0)
externalinterfaces++;
if ((ifs.int_flags & IFF_POINTOPOINT) == 0 ||
if_ifwithaddr(&ifs.int_dstaddr) == 0)
externalinterfaces++;
+ /*
+ * If we have a point-to-point link, we want to act
+ * as a supplier even if it's our only interface,
+ * as that's the only way our peer on the other end
+ * can tell that the link is up.
+ */
+ if ((ifs.int_flags & IFF_POINTOPOINT) && supplier < 0)
+ supplier = 1;
ifp->int_name = malloc(strlen(ifr->ifr_name) + 1);
if (ifp->int_name == 0) {
fprintf(stderr, "routed: ifinit: out of memory\n");
ifp->int_name = malloc(strlen(ifr->ifr_name) + 1);
if (ifp->int_name == 0) {
fprintf(stderr, "routed: ifinit: out of memory\n");
-static char sccsid[] = "@(#)timer.c 5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)timer.c 5.3 (Berkeley) %G%";
for (; rt != (struct rt_entry *)rh; rt = rt->rt_forw) {
/*
* We don't advance time on a routing entry for
for (; rt != (struct rt_entry *)rh; rt = rt->rt_forw) {
/*
* We don't advance time on a routing entry for
- * a passive gateway or that for our only interface.
- * The latter is excused because we don't act as
- * a routing information supplier and hence would
- * time it out. This is fair as if it's down
- * we're cut off from the world anyway and it's
- * not likely we'll grow any new hardware in
- * the mean time.
+ * a passive gateway, or any interface if we're
+ * not acting as supplier.
*/
if (!(rt->rt_state & RTS_PASSIVE) &&
*/
if (!(rt->rt_state & RTS_PASSIVE) &&
- (externalinterfaces > 1 ||
- !(rt->rt_state & RTS_INTERFACE)))
+ (supplier || !(rt->rt_state & RTS_INTERFACE)))
rt->rt_timer += TIMER_RATE;
if (rt->rt_timer >= EXPIRE_TIME)
rt->rt_metric = HOPCNT_INFINITY;
rt->rt_timer += TIMER_RATE;
if (rt->rt_timer >= EXPIRE_TIME)
rt->rt_metric = HOPCNT_INFINITY;