mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Move a comment and optimize the frag timeout code a slight bit.
Submitted by: maxim MFC with: The previous two revisions
This commit is contained in:
parent
a33ab077a7
commit
ecf44c01f4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=110178
@ -722,6 +722,7 @@ ip_input(struct mbuf *m)
|
||||
*/
|
||||
if (ip->ip_off & (IP_MF | IP_OFFMASK)) {
|
||||
|
||||
/* If maxnipq is 0, never accept fragments. */
|
||||
if (maxnipq == 0) {
|
||||
ipstat.ips_fragments++;
|
||||
ipstat.ips_fragdropped++;
|
||||
@ -748,7 +749,6 @@ ip_input(struct mbuf *m)
|
||||
/*
|
||||
* Enforce upper bound on number of fragmented packets
|
||||
* for which we attempt reassembly;
|
||||
* If maxnipq is 0, never accept fragments. (Handled above.)
|
||||
* If maxnipq is -1, accept all fragments without limitation.
|
||||
*/
|
||||
if ((nipq > maxnipq) && (maxnipq > 0)) {
|
||||
@ -1216,8 +1216,8 @@ ip_slowtimo()
|
||||
* (due to the limit being lowered), drain off
|
||||
* enough to get down to the new limit.
|
||||
*/
|
||||
for (i = 0; i < IPREASS_NHASH; i++) {
|
||||
if (maxnipq >= 0) {
|
||||
if (maxnipq > 0 && nipq > maxnipq) {
|
||||
for (i = 0; i < IPREASS_NHASH; i++) {
|
||||
while (nipq > maxnipq &&
|
||||
!TAILQ_EMPTY(&ipq[i])) {
|
||||
ipstat.ips_fragdropped++;
|
||||
|
Loading…
Reference in New Issue
Block a user