diff --git a/sbin/routed/if.c b/sbin/routed/if.c index da451e69e4d..fd8c6162565 100644 --- a/sbin/routed/if.c +++ b/sbin/routed/if.c @@ -1189,44 +1189,7 @@ ifinit(void) * after any dead interfaces have been deleted, which * might affect routes for point-to-point links. */ - if (!addrouteforif(ifp)) - continue; - - /* Add routes to the local end of point-to-point interfaces - * using loopback. - */ - if ((ifp->int_if_flags & IFF_POINTOPOINT) - && !(ifp->int_state & IS_REMOTE) - && foundloopback) { - /* Delete any routes to the network address through - * foreign routers. Remove even static routes. - */ - del_static(ifp->int_addr, HOST_MASK, 0, 0); - rt = rtget(ifp->int_addr, HOST_MASK); - if (rt != NULL && rt->rt_router != loopaddr) { - rtdelete(rt); - rt = NULL; - } - if (rt != NULL) { - if (!(rt->rt_state & RS_LOCAL) - || rt->rt_metric > ifp->int_metric) { - ifp1 = ifp; - } else { - ifp1 = rt->rt_ifp; - } - loop_rts.rts_ifp = ifp1; - loop_rts.rts_metric = 0; - loop_rts.rts_time = rt->rt_time; - rtchange(rt, ((rt->rt_state & ~RS_NET_SYN) - | (RS_IF|RS_LOCAL)), - &loop_rts, 0); - } else { - loop_rts.rts_ifp = ifp; - loop_rts.rts_metric = 0; - rtadd(ifp->int_addr, HOST_MASK, - (RS_IF | RS_LOCAL), &loop_rts); - } - } + addrouteforif(ifp); } /* add the authority routes */