send_imsg_session(IMSG_IFINFO, 0, &kif->k, sizeof(kif->k));
if_change(u_short ifindex, int flags, struct if_data *ifd){	struct kif_node		*kif;	struct kif_kr		*kkr;	struct kroute_nexthop	 nh;	struct knexthop_node	*n;	u_int8_t		 reachable;	if ((kif = kif_find(ifindex)) == NULL) {		log_warnx("interface with index %u not found",		    ifindex);		return;	}	kif->k.flags = flags;	kif->k.link_state = ifd->ifi_link_state;	kif->k.media_type = ifd->ifi_type;	kif->k.baudrate = ifd->ifi_baudrate;	if ((reachable = (flags & IFF_UP) &&	    (ifd->ifi_link_state != LINK_STATE_DOWN)) == kif->k.nh_reachable)		return;		/* nothing changed wrt nexthop validity */	kif->k.nh_reachable = reachable;	LIST_FOREACH(kkr, &kif->kroute_l, entry) {		/*		 * we treat link_state == LINK_STATE_UNKNOWN as valid		 * not all interfaces have a concept of "link state" and/or		 * do not report up		 */		if (reachable)			kkr->kr->r.flags &= ~F_DOWN;		else			kkr->kr->r.flags |= F_DOWN;		RB_FOREACH(n, knexthop_tree, &knt)			if (n->kroute == kkr->kr) {				bzero(&nh, sizeof(nh));				memcpy(&nh.nexthop, &n->nexthop,				    sizeof(nh.nexthop));				if (!(kkr->kr->r.flags & F_DOWN)) {					nh.valid = 1;					nh.connected = 1;					if ((nh.gateway.v4.s_addr =					    kkr->kr->r.nexthop.s_addr) != 0)						nh.gateway.af = AF_INET;				}				memcpy(&nh.kr, &kkr->kr->r, sizeof(nh.kr));				send_nexthop_update(&nh);			}	}}