Date: Thu, 13 Oct 2016 20:15:47 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307234 - in head/sys: netinet netinet6 Message-ID: <201610132015.u9DKFlhV008540@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Thu Oct 13 20:15:47 2016 New Revision: 307234 URL: https://svnweb.freebsd.org/changeset/base/307234 Log: - Revert r300854, r303657 which tried to fix regression from r297225. - Fix the regression proper way using RO_RTFREE(). Submitted by: ae Modified: head/sys/netinet/in_pcb.c head/sys/netinet/ip_output.c head/sys/netinet6/ip6_output.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Thu Oct 13 19:40:21 2016 (r307233) +++ head/sys/netinet/in_pcb.c Thu Oct 13 20:15:47 2016 (r307234) @@ -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; Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Thu Oct 13 19:40:21 2016 (r307233) +++ head/sys/netinet/ip_output.c Thu Oct 13 20:15:47 2016 (r307234) @@ -704,11 +704,7 @@ sendit: 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) /* Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Thu Oct 13 19:40:21 2016 (r307233) +++ head/sys/netinet6/ip6_output.c Thu Oct 13 20:15:47 2016 (r307234) @@ -1064,12 +1064,7 @@ sendorfree: 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610132015.u9DKFlhV008540>