Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Mar 2014 09:23:59 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r263334 - stable/10/sys/netinet
Message-ID:  <201403190923.s2J9NxnF051313@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Mar 19 09:23:58 2014
New Revision: 263334
URL: http://svnweb.freebsd.org/changeset/base/263334

Log:
  Merge r262747: remove extraneous ifa_ref()/ifa_free().

Modified:
  stable/10/sys/netinet/ip_output.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/ip_output.c
==============================================================================
--- stable/10/sys/netinet/ip_output.c	Wed Mar 19 06:08:03 2014	(r263333)
+++ stable/10/sys/netinet/ip_output.c	Wed Mar 19 09:23:58 2014	(r263334)
@@ -295,7 +295,6 @@ again:
 			goto bad;
 		}
 		ia = ifatoia(rte->rt_ifa);
-		ifa_ref(&ia->ia_ifa);
 		ifp = rte->rt_ifp;
 		rte->rt_rmx.rmx_pksent++;
 		if (rte->rt_flags & RTF_GATEWAY)
@@ -532,11 +531,8 @@ sendit:
 #endif
 			error = netisr_queue(NETISR_IP, m);
 			goto done;
-		} else {
-			if (ia != NULL)
-				ifa_free(&ia->ia_ifa);
+		} else
 			goto again;	/* Redo the routing table lookup. */
-		}
 	}
 
 	/* See if local, if yes, send it to netisr with IP_FASTFWD_OURS. */
@@ -565,8 +561,6 @@ sendit:
 		m->m_flags |= M_SKIP_FIREWALL;
 		m->m_flags &= ~M_IP_NEXTHOP;
 		m_tag_delete(m, fwd_tag);
-		if (ia != NULL)
-			ifa_free(&ia->ia_ifa);
 		goto again;
 	}
 
@@ -677,8 +671,6 @@ passout:
 done:
 	if (ro == &iproute)
 		RO_RTFREE(ro);
-	if (ia != NULL)
-		ifa_free(&ia->ia_ifa);
 	return (error);
 bad:
 	m_freem(m);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403190923.s2J9NxnF051313>