svn commit: r221891 - head/sys/netinet

John Baldwin jhb at FreeBSD.org
Sat May 14 14:41:41 UTC 2011


Author: jhb
Date: Sat May 14 14:41:40 2011
New Revision: 221891
URL: http://svn.freebsd.org/changeset/base/221891

Log:
  Oops, fix order of sequence numbers in KASSERT()'s to catch negative
  receive windows to match the labels in the panic message.
  
  Submitted by:	trociny

Modified:
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_timewait.c

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Sat May 14 14:40:24 2011	(r221890)
+++ head/sys/netinet/tcp_input.c	Sat May 14 14:41:40 2011	(r221891)
@@ -1833,7 +1833,7 @@ tcp_do_segment(struct mbuf *m, struct tc
 		win = 0;
 	KASSERT(SEQ_GEQ(tp->rcv_adv, tp->rcv_nxt),
 	    ("tcp_input negative window: tp %p rcv_nxt %u rcv_adv %u", tp,
-	    tp->rcv_adv, tp->rcv_nxt));
+	    tp->rcv_nxt, tp->rcv_adv));
 	tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt));
 
 	/* Reset receive buffer auto scaling when not in bulk receive mode. */

Modified: head/sys/netinet/tcp_timewait.c
==============================================================================
--- head/sys/netinet/tcp_timewait.c	Sat May 14 14:40:24 2011	(r221890)
+++ head/sys/netinet/tcp_timewait.c	Sat May 14 14:41:40 2011	(r221891)
@@ -244,7 +244,7 @@ tcp_twstart(struct tcpcb *tp)
 	 */
 	KASSERT(SEQ_GEQ(tp->rcv_adv, tp->rcv_nxt),
 	    ("tcp_twstart negative window: tp %p rcv_nxt %u rcv_adv %u", tp,
-	    tp->rcv_adv, tp->rcv_nxt));
+	    tp->rcv_nxt, tp->rcv_adv));
 	tw->last_win = (tp->rcv_adv - tp->rcv_nxt) >> tp->rcv_scale;
 
 	/*


More information about the svn-src-head mailing list