-/* $OpenBSD: rtable.c,v 1.77 2022/04/19 15:44:56 bluhm Exp $ */
+/* $OpenBSD: rtable.c,v 1.78 2022/06/27 17:15:35 bluhm Exp $ */
/*
* Copyright (c) 2014-2016 Martin Pieuchot
if (!mpathok ||
(mrt->rt_gateway->sa_len == gateway->sa_len &&
- !memcmp(mrt->rt_gateway, gateway, gateway->sa_len))){
+ memcmp(mrt->rt_gateway, gateway,
+ gateway->sa_len) == 0)) {
error = EEXIST;
goto leave;
}
-/* $OpenBSD: rtsock.c,v 1.331 2022/06/27 08:15:38 claudio Exp $ */
+/* $OpenBSD: rtsock.c,v 1.332 2022/06/27 17:15:35 bluhm Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
ifp = if_get(rt->rt_ifidx);
if (ifp != NULL) {
info.rti_info[RTAX_IFP] = sdltosa(ifp->if_sadl);
- info.rti_info[RTAX_IFA] =
- rtable_getsource(tableid, info.rti_info[RTAX_DST]->sa_family);
+ info.rti_info[RTAX_IFA] = rtable_getsource(tableid,
+ info.rti_info[RTAX_DST]->sa_family);
if (info.rti_info[RTAX_IFA] == NULL)
info.rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr;
if (ifp->if_flags & IFF_POINTOPOINT)
goto fail;
info.rti_flags = rtm->rtm_flags;
-
+
if (rtm->rtm_type != RTM_SOURCE &&
rtm->rtm_type != RTM_PROPOSAL &&
(info.rti_info[RTAX_DST] == NULL ||
ifp = if_get(rt->rt_ifidx);
if (ifp != NULL) {
info.rti_info[RTAX_IFP] = sdltosa(ifp->if_sadl);
- info.rti_info[RTAX_IFA] =
- rtable_getsource(rtableid, info.rti_info[RTAX_DST]->sa_family);
+ info.rti_info[RTAX_IFA] = rtable_getsource(rtableid,
+ info.rti_info[RTAX_DST]->sa_family);
if (info.rti_info[RTAX_IFA] == NULL)
info.rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr;
}
rtm->rtm_tableid = ifp->if_rdomain;
rtm->rtm_index = ifp->if_index;
rtm->rtm_addrs = rtinfo->rti_addrs;
-
+
route_input(m, NULL, rtinfo->rti_info[RTAX_DNS]->sa_family);
}