NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/46265: NPF: update the tstate->nst_end wrongly



>Number:         46265
>Category:       kern
>Synopsis:       NPF: update the tstate->nst_end wrongly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 27 09:00:01 +0000 2012
>Originator:     Changli Gao
>Release:        CVS/TRUNK
>Organization:
China
>Environment:
I am not using netbsd, but a code reader.
>Description:
file: npf_state_tcp.c

427          * Packet has been passed.
428          *
429          * Negative ackskew might be due to fragmented packets.  Since the
430          * total length of the packet is unknown - bump the boundary.
431          */
432         if (ackskew < 0) {
433                 tstate->nst_end = end;

The above line is incorrect. After reading the corresponding paper again, I 
think "end" should be "ack". I suppose it is just a typo. :)

434         }
435         /* Keep track of the maximum window seen. */
436         if (fstate->nst_maxwin < win) {
437                 fstate->nst_maxwin = win;
438         }
439         if (SEQ_GT(end, fstate->nst_end)) {
440                 fstate->nst_end = end;
441         }

>How-To-Repeat:
Read the source code carefully.
>Fix:
Replace "end" with "ack".



Home | Main Index | Thread Index | Old Index