From owner-p4-projects@FreeBSD.ORG Wed Jul 30 19:41:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A5BB11065672; Wed, 30 Jul 2008 19:41:30 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69AE4106564A for ; Wed, 30 Jul 2008 19:41:30 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5D0A78FC20 for ; Wed, 30 Jul 2008 19:41:30 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m6UJfUNh012409 for ; Wed, 30 Jul 2008 19:41:30 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m6UJfURr012407 for perforce@freebsd.org; Wed, 30 Jul 2008 19:41:30 GMT (envelope-from rpaulo@FreeBSD.org) Date: Wed, 30 Jul 2008 19:41:30 GMT Message-Id: <200807301941.m6UJfURr012407@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo To: Perforce Change Reviews Cc: Subject: PERFORCE change 146262 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jul 2008 19:41:30 -0000 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 @@ -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: