lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] [bug #35945] SYN packet should provide the recv MSS not


From: Mason
Subject: Re: [lwip-devel] [bug #35945] SYN packet should provide the recv MSS not the send MSS
Date: Tue, 27 Mar 2012 16:19:35 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20120312 Firefox/11.0 SeaMonkey/2.8

Simon Goldschmidt wrote:

> Mason wrote:
> 
>> Mason wrote:
>>
>>> Simon,
>>>
>>> Can this bug be fixed in time for 1.4.1?
>>>
>>> Do you need more information?
>>>
>>> Reply to this item at:
>>>  <http://savannah.nongnu.org/bugs/?35945>
>>
>> (Please forgive me if I sound insistent, I'm trying very hard to
>> avoid out-of-tree patches, and we plan on using the 1.4 branch.)
>>
>> Do you need more information?
>> I can work on an acceptable patch/solution.
>>
>> Please tell me the status.
> 
> For me, the status would be that I'd try to fix it for 1.4.1 but
> haven't found the time so far. I've been working on all the other
> things yesterday and it turned out time's too short again :-)

When you say you'd try to fix it, does this mean that my proposed
patch is not an acceptable solution? I am willing to help you on
this if you tell me how you want it fixed.

For reference, the proposed patch is:

--- tcp_out.c   2012-02-23 10:57:12.859375000 +0100
+++ tcp_out.c   2012-03-22 13:44:36.750000000 +0100
@@ -1066,7 +1066,11 @@
      packets, so ignore it here */
   opts = (u32_t *)(void *)(seg->tcphdr + 1);
   if (seg->flags & TF_SEG_OPTS_MSS) {
-    *opts = TCP_BUILD_MSS_OPTION(pcb->mss);
+    int mss = TCP_MSS;
+#if TCP_CALCULATE_EFF_SEND_MSS
+    mss = tcp_eff_send_mss(TCP_MSS, &pcb->remote_ip);
+#endif
+    *opts = TCP_BUILD_MSS_OPTION(mss);
     opts += 1;
   }
 #if LWIP_TCP_TIMESTAMPS

As I wrote in the bug tracker, it might make sense to rename
TCP_CALCULATE_EFF_SEND_MSS and tcp_eff_send_mss (drop the
"send" bit) since we'd be using the function both for SEND
and RECV MSS.

What do you think?

-- 
Regards.



reply via email to

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