Fix regression in rev. 1.140.
Reported by: Yuriy Tsibizov <Yuriy.Tsibizov gfk.ru>, bsam
This commit is contained in:
parent
02e4a32084
commit
5de558219a
@ -514,7 +514,9 @@ route_output(struct mbuf *m, struct socket *so)
|
||||
senderr(error);
|
||||
RT_LOCK(rt);
|
||||
}
|
||||
if (info.rti_ifa != rt->rt_ifa && rt->rt_ifa != NULL &&
|
||||
if (info.rti_ifa != NULL &&
|
||||
info.rti_ifa != rt->rt_ifa &&
|
||||
rt->rt_ifa != NULL &&
|
||||
rt->rt_ifa->ifa_rtrequest != NULL) {
|
||||
rt->rt_ifa->ifa_rtrequest(RTM_DELETE, rt,
|
||||
&info);
|
||||
@ -528,12 +530,11 @@ route_output(struct mbuf *m, struct socket *so)
|
||||
}
|
||||
rt->rt_flags |= RTF_GATEWAY;
|
||||
}
|
||||
if (info.rti_ifa != rt->rt_ifa) {
|
||||
if (info.rti_ifa != NULL &&
|
||||
info.rti_ifa != rt->rt_ifa) {
|
||||
IFAREF(info.rti_ifa);
|
||||
rt->rt_ifa = info.rti_ifa;
|
||||
if (info.rti_ifa != NULL) {
|
||||
IFAREF(info.rti_ifa);
|
||||
rt->rt_ifp = info.rti_ifp;
|
||||
}
|
||||
rt->rt_ifp = info.rti_ifp;
|
||||
}
|
||||
/* Allow some flags to be toggled on change. */
|
||||
if (rtm->rtm_fmask & RTF_FMASK)
|
||||
|
Loading…
x
Reference in New Issue
Block a user