lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #49631] Zero window and refused data problem


From: Joel Cunningham
Subject: [lwip-devel] [bug #49631] Zero window and refused data problem
Date: Sat, 10 Dec 2016 00:40:33 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #8, bug #49631 (project lwip):

I studied the tcp input path and the distance between the refused_data check
and the check against receive window.  Switching these two is going to be a
much more involved and risky due to the amount of logic that separates the two
checks.

refused_data is checked very early in tcp_input() and the window check is done
much later in tcp_receive():


tcp_in.c: 1361
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt,
                    pcb->rcv_nxt + pcb->rcv_wnd - 1)) {


Instead, I came up with an alternate fix: try to target the refused_data zero
window probe case and respond with an empty ACK (containing RCV.NXT) since
this is the standards violation

This turned out to be somewhat similar to what the original reporter (Oleg)
had suggested, except his patch didn't target zero window probes and just sent
an ACK with RCV.NXT for every refused segment

The one caveat my change has is that it won't respond to the 1 byte segment if
the sending TCP is LwIP and is running the persist timer because it can't
truly fill the window (see fix for bug #49533).  This is because the receiving
TCP can't identify a zero window probe if rcv_ann_wnd is non-zero. 
Technically in this contrived case and there is no standards violation because
the window is not closed and the 1 byte segment is not a legitimate zero
window probe

My patch is a first pass at addressing the standards violation.  Oleg, can you
try the patch in your port?  It should apply to 1.4.1 I believe

(file #39191)
    _______________________________________________________

Additional Item Attachment:

File name: 0001-First-pass-at-fixing-refused_data-with-zero-window-p.patch
Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?49631>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]