diff options
author | jhb <jhb@FreeBSD.org> | 2011-05-14 14:41:40 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2011-05-14 14:41:40 +0000 |
commit | 2ef192a4b43b1740ebb16a663ddf18fda82c1e34 (patch) | |
tree | e80849d49112aa820f0b3423f2d6a20b8cf2e5d0 /sys/netinet | |
parent | 5a5941f823ad182ae1323de5474eb05d68bd87e8 (diff) | |
download | FreeBSD-src-2ef192a4b43b1740ebb16a663ddf18fda82c1e34.zip FreeBSD-src-2ef192a4b43b1740ebb16a663ddf18fda82c1e34.tar.gz |
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
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_input.c | 2 | ||||
-rw-r--r-- | sys/netinet/tcp_timewait.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 6abf8db..1a94d0a 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1833,7 +1833,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, 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. */ diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 4427e1c..fbcd601 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -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; /* |