diff --git a/sys/net/if.c b/sys/net/if.c index 3a7c15cc2ec6..982fc002cd8e 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -377,15 +377,13 @@ void if_up(ifp) register struct ifnet *ifp; { + register struct ifaddr *ifa; ifp->if_flags |= IFF_UP; microtime(&ifp->if_lastchange); -#ifdef notyet - register struct ifaddr *ifa; - /* this has no effect on IP, and will kill all iso connections XXX */ - for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) + for (ifa = ifp->if_addrhead.tqh_first; ifa; + ifa = ifa->ifa_link.tqe_next) pfctlinput(PRC_IFUP, ifa->ifa_addr); -#endif rt_ifmsg(ifp); } diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index 5b48ee9cd92f..06b03c9baf10 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -224,6 +224,7 @@ extern struct pr_usrreqs pru_oldstyle; */ #define PRC_IFDOWN 0 /* interface transition */ #define PRC_ROUTEDEAD 1 /* select new route if possible ??? */ +#define PRC_IFUP 2 /* interface has come back up */ #define PRC_QUENCH2 3 /* DEC congestion bit says slow down */ #define PRC_QUENCH 4 /* some one said to slow down */ #define PRC_MSGSIZE 5 /* message size forced drop */ @@ -250,7 +251,7 @@ extern struct pr_usrreqs pru_oldstyle; #ifdef PRCREQUESTS char *prcrequests[] = { - "IFDOWN", "ROUTEDEAD", "#2", "DEC-BIT-QUENCH2", + "IFDOWN", "ROUTEDEAD", "IFUP", "DEC-BIT-QUENCH2", "QUENCH", "MSGSIZE", "HOSTDEAD", "#7", "NET-UNREACH", "HOST-UNREACH", "PROTO-UNREACH", "PORT-UNREACH", "#12", "SRCFAIL-UNREACH", "NET-REDIRECT", "HOST-REDIRECT",