* Mark an interface up and notify protocols of * the transition. */
| 2215 | * the transition. |
| 2216 | */ |
| 2217 | static void |
| 2218 | if_route(struct ifnet *ifp, int flag, int fam) |
| 2219 | { |
| 2220 | struct ifaddr *ifa; |
| 2221 | |
| 2222 | KASSERT(flag == IFF_UP, ("if_route: flag != IFF_UP")); |
| 2223 | |
| 2224 | ifp->if_flags |= flag; |
| 2225 | getmicrotime(&ifp->if_lastchange); |
| 2226 | CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) |
| 2227 | if (fam == PF_UNSPEC || (fam == ifa->ifa_addr->sa_family)) |
| 2228 | pfctlinput(PRC_IFUP, ifa->ifa_addr); |
| 2229 | if (ifp->if_carp) |
| 2230 | (*carp_linkstate_p)(ifp); |
| 2231 | rt_ifmsg(ifp); |
| 2232 | #ifdef INET6 |
| 2233 | in6_if_up(ifp); |
| 2234 | #endif |
| 2235 | } |
| 2236 | |
| 2237 | void (*vlan_link_state_p)(struct ifnet *); /* XXX: private from if_vlan */ |
| 2238 | void (*vlan_trunk_cap_p)(struct ifnet *); /* XXX: private from if_vlan */ |
no test coverage detected