Subject: Re: Hashing IP reassembly queues, phase 1 of 2: hash.
To: None <tech-net@NetBSD.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-net
Date: 12/06/2003 10:20:52
Mike Grupenhoff <mg@munge.com> found a typo in the slow-timeout aging
code:

+		while (ip_nfragpackets > ip_maxfragpackets && wrapped == 0) {
+			while (LIST_FIRST(&ipq[i]) != NULL)
+				ip_freef(LIST_FIRST(&ipq[0]));

should instead be

+		while (ip_nfragpackets > ip_maxfragpackets && wrapped == 0) {
+			while (LIST_FIRST(&ipq[i]) != NULL)
+				ip_freef(LIST_FIRST(&ipq[i]));

As I hinted, I haven't used this fragment of the hash code in anger.
With the companion patch, this fragment would be replaced by a
"drop-half" operation.

Any other comments?