- Revert r300854, r303657 which tried to fix regression from r297225.
- Fix the regression proper way using RO_RTFREE(). Submitted by: ae
This commit is contained in:
parent
3ee632a828
commit
444f6777c7
@ -1299,10 +1299,7 @@ in_pcbfree(struct inpcb *inp)
|
||||
if (inp->inp_moptions != NULL)
|
||||
inp_freemoptions(inp->inp_moptions);
|
||||
#endif
|
||||
if (inp->inp_route.ro_rt) {
|
||||
RTFREE(inp->inp_route.ro_rt);
|
||||
inp->inp_route.ro_rt = (struct rtentry *)NULL;
|
||||
}
|
||||
RO_RTFREE(&inp->inp_route);
|
||||
if (inp->inp_route.ro_lle)
|
||||
LLE_FREE(inp->inp_route.ro_lle); /* zeros ro_lle */
|
||||
|
||||
@ -2242,10 +2239,7 @@ void
|
||||
in_losing(struct inpcb *inp)
|
||||
{
|
||||
|
||||
if (inp->inp_route.ro_rt) {
|
||||
RTFREE(inp->inp_route.ro_rt);
|
||||
inp->inp_route.ro_rt = (struct rtentry *)NULL;
|
||||
}
|
||||
RO_RTFREE(&inp->inp_route);
|
||||
if (inp->inp_route.ro_lle)
|
||||
LLE_FREE(inp->inp_route.ro_lle); /* zeros ro_lle */
|
||||
return;
|
||||
|
@ -704,11 +704,7 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
|
||||
IPSTAT_INC(ips_fragmented);
|
||||
|
||||
done:
|
||||
/*
|
||||
* Release the route if using our private route, or if
|
||||
* (with flowtable) we don't have our own reference.
|
||||
*/
|
||||
if (ro == &iproute || ro->ro_flags & RT_NORTREF)
|
||||
if (ro == &iproute)
|
||||
RO_RTFREE(ro);
|
||||
else if (rte == NULL)
|
||||
/*
|
||||
|
@ -1064,12 +1064,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt,
|
||||
IP6STAT_INC(ip6s_fragmented);
|
||||
|
||||
done:
|
||||
/*
|
||||
* Release the route if using our private route, or if
|
||||
* (with flowtable) we don't have our own reference.
|
||||
*/
|
||||
if (ro == &ip6route ||
|
||||
(ro != NULL && ro->ro_flags & RT_NORTREF))
|
||||
if (ro == &ip6route)
|
||||
RO_RTFREE(ro);
|
||||
return (error);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user