Back out rev 1.242.2.13 as it introduces a potentially expensive hash lookup

to the ip output path. A better way needs to be found to resolve this.

Approved by:	re@
This commit is contained in:
bms 2006-09-26 18:28:38 +00:00
parent 769be39ef2
commit 43b1823c85

View File

@ -125,7 +125,6 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro,
int len, error = 0;
struct sockaddr_in *dst = NULL; /* keep compiler happy */
struct in_ifaddr *ia = NULL;
struct in_ifaddr *sia = NULL;
int isbroadcast, sw_csum;
struct route iproute;
struct in_addr odst;
@ -753,11 +752,8 @@ passout:
/* Record statistics for this interface address. */
if (!(flags & IP_FORWARDING) && ia) {
INADDR_TO_IFADDR(ip->ip_src, sia);
if (sia == NULL)
sia = ia;
sia->ia_ifa.if_opackets++;
sia->ia_ifa.if_obytes += m->m_pkthdr.len;
ia->ia_ifa.if_opackets++;
ia->ia_ifa.if_obytes += m->m_pkthdr.len;
}
#ifdef IPSEC
@ -809,11 +805,8 @@ passout:
if (error == 0) {
/* Record statistics for this interface address. */
if (ia != NULL) {
INADDR_TO_IFADDR(ip->ip_src, sia);
if (sia == NULL)
sia = ia;
sia->ia_ifa.if_opackets++;
sia->ia_ifa.if_obytes += m->m_pkthdr.len;
ia->ia_ifa.if_opackets++;
ia->ia_ifa.if_obytes += m->m_pkthdr.len;
}
error = (*ifp->if_output)(ifp, m,