Date: Wed, 30 Jul 2008 19:41:30 GMT From: Rui Paulo <rpaulo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 146262 for review Message-ID: <200807301941.m6UJfURr012407@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=146262 Change 146262 by rpaulo@rpaulo_epsilon on 2008/07/30 19:40:33 Add a missing call to tcpad_verify_topts(). Add missing returns. s/SACK_PERM/SACKOK/ Affected files ... .. //depot/projects/soc2008/rpaulo-tcpad/verify.c#6 edit Differences ... ==== //depot/projects/soc2008/rpaulo-tcpad/verify.c#6 (text+ko) ==== @@ -23,7 +23,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/soc2008/rpaulo-tcpad/verify.c#5 $ + * $P4: //depot/projects/soc2008/rpaulo-tcpad/verify.c#6 $ */ #include <stdio.h> @@ -285,7 +285,10 @@ dumper_free(cp); LIST_REMOVE(cp, entries); free(cp); + return (NULL); } + tcpad_verify_topts(topts, tp, th->th_flags, + TCPAD_VERIFY_DIRECTION_IN); break; default: dumper_error(cp, "SYN/ACK received, state != SYN_SENT"); @@ -315,11 +318,13 @@ dumper_free(cp); LIST_REMOVE(cp, entries); free(cp); + return (NULL); } else { dumper_error(cp, "RST: ACK < snd_nxt"); dumper_free(cp); LIST_REMOVE(cp, entries); free(cp); + return (NULL); } break; default: @@ -368,6 +373,7 @@ dumper_free(cp); LIST_REMOVE(cp, entries); free(cp); + return (NULL); } break; case TCPS_FIN_WAIT_1: @@ -397,15 +403,19 @@ dumper_free(cp); LIST_REMOVE(cp, entries); free(cp); + return (NULL); } } else { if (SEQ_LT(th->th_seq, tp->rcv_nxt) || SEQ_GEQ(th->th_seq, tp->rcv_nxt + tp->rcv_wnd)) { - dumper_error(cp, "SEQ.SEQ < " + dumper_error(cp, "SEG.SEQ < " "RCV.NXT or SEG.SEQ >= " "RCV.NXT + RCV.WND"); dumper_free(cp); + LIST_REMOVE(cp, entries); + free(cp); + return (NULL); } } } else { @@ -431,6 +441,7 @@ if (SEQ_GEQ(th->th_ack, tp->snd_una) && SEQ_LEQ(th->th_ack, tp->snd_nxt)) { tp->snd_una = th->th_ack; + tp->rcv_nxt = tp->snd_una + 1; /* update send window */ if (SEQ_LT(tp->snd_wl1, th->th_seq) || (tp->snd_wl1 == th->th_seq && @@ -439,6 +450,13 @@ tp->snd_wl1 = th->th_seq; tp->snd_wl2 = th->th_ack; } + } else { + dumper_error(cp, "SEG.ACK < SND.UNA or " + "SEG.ACK > SND.NXT"); + dumper_free(cp); + LIST_REMOVE(cp, entries); + free(cp); + return (NULL); } break; default: @@ -508,7 +526,7 @@ i += 9; break; case TCPOPT_SACK_PERMITTED: - DPRINTF(DEBUG_TOPTS, "SACK_PERM option found\n"); + DPRINTF(DEBUG_TOPTS, "SACKOK option found\n"); i += 1; break; case TCPOPT_SACK:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807301941.m6UJfURr012407>