View | Details | Raw Unified | Return to bug 220078 | Differences between
and this patch

Collapse All | Expand All

(-)sys/netinet/ip_input.c (-3 / +4 lines)
Lines 446-451 Link Here
446
void
446
void
447
ip_input(struct mbuf *m)
447
ip_input(struct mbuf *m)
448
{
448
{
449
	struct rm_priotracker in_ifa_tracker;
449
	struct ip *ip = NULL;
450
	struct ip *ip = NULL;
450
	struct in_ifaddr *ia = NULL;
451
	struct in_ifaddr *ia = NULL;
451
	struct ifaddr *ifa;
452
	struct ifaddr *ifa;
Lines 677-683 Link Here
677
	/*
678
	/*
678
	 * Check for exact addresses in the hash bucket.
679
	 * Check for exact addresses in the hash bucket.
679
	 */
680
	 */
680
	/* IN_IFADDR_RLOCK(); */
681
	IN_IFADDR_RLOCK(&in_ifa_tracker);
681
	LIST_FOREACH(ia, INADDR_HASH(ip->ip_dst.s_addr), ia_hash) {
682
	LIST_FOREACH(ia, INADDR_HASH(ip->ip_dst.s_addr), ia_hash) {
682
		/*
683
		/*
683
		 * If the address matches, verify that the packet
684
		 * If the address matches, verify that the packet
Lines 689-699 Link Here
689
			counter_u64_add(ia->ia_ifa.ifa_ipackets, 1);
690
			counter_u64_add(ia->ia_ifa.ifa_ipackets, 1);
690
			counter_u64_add(ia->ia_ifa.ifa_ibytes,
691
			counter_u64_add(ia->ia_ifa.ifa_ibytes,
691
			    m->m_pkthdr.len);
692
			    m->m_pkthdr.len);
692
			/* IN_IFADDR_RUNLOCK(); */
693
			IN_IFADDR_RUNLOCK(&in_ifa_tracker);
693
			goto ours;
694
			goto ours;
694
		}
695
		}
695
	}
696
	}
696
	/* IN_IFADDR_RUNLOCK(); */
697
	IN_IFADDR_RUNLOCK(&in_ifa_tracker);
697
698
698
	/*
699
	/*
699
	 * Check for broadcast addresses.
700
	 * Check for broadcast addresses.

Return to bug 220078