Source-Changes-HG archive

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

[src/netbsd-3-0]: src/sys/dist/ipf/netinet Pull up following revision(s) (req...



details:   https://anonhg.NetBSD.org/src/rev/174e8e563cfb
branches:  netbsd-3-0
changeset: 579366:174e8e563cfb
user:      ghen <ghen%NetBSD.org@localhost>
date:      Tue Jan 09 12:10:48 2007 +0000

description:
Pull up following revision(s) (requested by darrenr in ticket #1610):
        sys/dist/ipf/netinet/ip_state.c: revision 1.16 via patch
TCP window scaling was being recognised but the recorded settins were being
clobbered and thus effectively disabled

diffstat:

 sys/dist/ipf/netinet/ip_state.c |  27 ++++++++-------------------
 1 files changed, 8 insertions(+), 19 deletions(-)

diffs (72 lines):

diff -r 63011be5e677 -r 174e8e563cfb sys/dist/ipf/netinet/ip_state.c
--- a/sys/dist/ipf/netinet/ip_state.c   Mon Jan 08 20:46:35 2007 +0000
+++ b/sys/dist/ipf/netinet/ip_state.c   Tue Jan 09 12:10:48 2007 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_state.c,v 1.5.2.1 2005/04/04 18:25:59 tron Exp $    */
+/*     $NetBSD: ip_state.c,v 1.5.2.1.2.1 2007/01/09 12:10:48 ghen Exp $        */
 
 /*
  * Copyright (C) 1995-2003 by Darren Reed.
@@ -110,7 +110,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_state.c,v 1.5.2.1 2005/04/04 18:25:59 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_state.c,v 1.5.2.1.2.1 2007/01/09 12:10:48 ghen Exp $");
 #else
 static const char sccsid[] = "@(#)ip_state.c   1.8 6/5/96 (C) 1993-2000 Darren Reed";
 static const char rcsid[] = "@(#)Id: ip_state.c,v 2.186.2.29 2005/03/28 10:47:54 darrenr Exp";
@@ -1326,14 +1326,10 @@
                if (flags == (TH_SYN|TH_ACK)) {
                        is->is_s0[source] = ntohl(tcp->th_ack);
                        is->is_s0[!source] = ntohl(tcp->th_seq) + 1;
-                       if ((TCP_OFF(tcp) > (sizeof(tcphdr_t) >> 2)) &&
-                           tdata->td_winscale) {
+                       if (TCP_OFF(tcp) > (sizeof(tcphdr_t) >> 2)) {
                                if (fr_tcpoptions(fin, tcp, fdata)) {
                                        fdata->td_winflags = TCP_WSCALE_SEEN|
                                                             TCP_WSCALE_FIRST;
-                               } else {
-                                       if (!fdata->td_winscale)
-                                               tdata->td_winscale = 0;
                                }
                        }
                        if ((fin->fin_out != 0) && (is->is_pass & FR_NEWISN))
@@ -1341,8 +1337,8 @@
                } else if (flags == TH_SYN) {
                        is->is_s0[source] = ntohl(tcp->th_seq) + 1;
                        if ((TCP_OFF(tcp) > (sizeof(tcphdr_t) >> 2)))
-                               if (fr_tcpoptions(fin, tcp, tdata)) {
-                                       tdata->td_winflags = TCP_WSCALE_SEEN|
+                               if (fr_tcpoptions(fin, tcp, fdata)) {
+                                       fdata->td_winflags = TCP_WSCALE_SEEN|
                                                             TCP_WSCALE_FIRST;
                                }
 
@@ -1442,15 +1438,8 @@
         * the receiver also does window scaling)
         */
        if (!(tcpflags & TH_SYN) && (fdata->td_winflags & TCP_WSCALE_FIRST)) {
-               if (tdata->td_winflags & TCP_WSCALE_SEEN) {
-                       fdata->td_winflags &= ~TCP_WSCALE_FIRST;
-                       fdata->td_maxwin = win;
-               } else {
-                       fdata->td_winscale = 0;
-                       fdata->td_winflags = 0;
-                       tdata->td_winscale = 0;
-                       tdata->td_winflags = 0;
-                 }
+               fdata->td_winflags &= ~TCP_WSCALE_FIRST;
+               fdata->td_maxwin = win;
        }
 
        end = seq + fin->fin_dlen - (TCP_OFF(tcp) << 2) +
@@ -1499,7 +1488,7 @@
 #endif
 /* XXX what about big packets */
 #define MAXACKWINDOW 66000
-           (-ackskew <= (MAXACKWINDOW << fdata->td_winscale)) &&
+           (-ackskew <= MAXACKWINDOW) &&
            ( ackskew <= (MAXACKWINDOW << fdata->td_winscale))) {
 
                /* if ackskew < 0 then this should be due to fragmented



Home | Main Index | Thread Index | Old Index