-/* $OpenBSD: route.c,v 1.251 2015/10/14 10:09:30 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.252 2015/10/14 10:18:03 mpi Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
info->rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr;
}
- info->rti_flags = rt->rt_flags & ~(RTF_CLONING | RTF_STATIC);
- info->rti_flags |= RTF_CLONED;
+ info->rti_flags = rt->rt_flags | (RTF_CLONED|RTF_HOST);
+ info->rti_flags &= ~(RTF_CLONING|RTF_CONNECTED|RTF_STATIC);
info->rti_info[RTAX_GATEWAY] = (struct sockaddr *)&sa_dl;
- info->rti_flags |= RTF_HOST;
info->rti_info[RTAX_LABEL] =
rtlabel_id2sa(rt->rt_labelid, &sa_rl2);
/* FALLTHROUGH */
ifa->ifa_refcnt++;
rt->rt_ifa = ifa;
rt->rt_ifp = ifa->ifa_ifp;
- if (req == RTM_RESOLVE) {
+ if (rt->rt_flags & RTF_CLONED) {
/*
* If the ifa of the cloning route was stale, a
* successful lookup for an ifa with the same address