]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
fixed the fix for bug #35945 (SYN packet should provide the recv MSS not the send...
authorgoldsimon <goldsimon@gmx.de>
Wed, 28 Mar 2012 09:06:52 +0000 (11:06 +0200)
committergoldsimon <goldsimon@gmx.de>
Wed, 28 Mar 2012 09:06:52 +0000 (11:06 +0200)
src/core/tcp_out.c

index f79ffdbc9feab4a3fd56ef552994e30f3a253ed5..74c4900d1251b9d94c0318590578c0593a17ab4a 100644 (file)
@@ -1071,7 +1071,13 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb)
      packets, so ignore it here */
   opts = (u32_t *)(void *)(seg->tcphdr + 1);
   if (seg->flags & TF_SEG_OPTS_MSS) {
-    *opts = TCP_BUILD_MSS_OPTION(tcp_eff_send_mss(TCP_MSS, &pcb->local_ip, &pcb->remote_ip, PCB_ISIPV6(pcb)));
+    u16_t mss;
+#if TCP_CALCULATE_EFF_SEND_MSS
+    mss = tcp_eff_send_mss(TCP_MSS, &pcb->local_ip, &pcb->remote_ip, PCB_ISIPV6(pcb));
+#else /* TCP_CALCULATE_EFF_SEND_MSS */
+    mss = TCP_MSS;
+#endif /* TCP_CALCULATE_EFF_SEND_MSS */
+    *opts = TCP_BUILD_MSS_OPTION(mss);
     opts += 1;
   }
 #if LWIP_TCP_TIMESTAMPS