Author: cgutman
Date: Thu Aug 19 22:15:58 2010
New Revision: 48569
URL:
http://svn.reactos.org/svn/reactos?rev=48569&view=rev
Log:
[OSKITTCP]
- Disable routing because oskit needs to let our code do that
- Comment out the ACK hack and restore the default BSD behavior
Modified:
trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c
trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_input.c
trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c
Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
==============================================================================
--- trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] Thu Aug 19
22:15:58 2010
@@ -129,6 +129,7 @@
if( !error ) {
so->so_connection = context;
so->so_state |= SS_NBIO;
+ so->so_options |= SO_DONTROUTE;
*aso = so;
}
OSKUnlock();
Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_input.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
==============================================================================
--- trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_input.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_input.c [iso-8859-1] Thu Aug 19
22:15:58 2010
@@ -84,6 +84,7 @@
* Set DELACK for segments received in order, but ack immediately
* when segments are out of order (so fast retransmit can work).
*/
+#ifdef TCP_ACK_HACK
#define TCP_REASS(tp, ti, m, so, flags) { \
if ((ti)->ti_seq == (tp)->rcv_nxt && \
(tp)->seg_next == (struct tcpiphdr *)(tp) && \
@@ -103,6 +104,24 @@
tp->t_flags |= TF_ACKNOW; \
} \
}
+#else
+#define TCP_REASS(tp, ti, m, so, flags) { \
+ if ((ti)->ti_seq == (tp)->rcv_nxt && \
+ (tp)->seg_next == (struct tcpiphdr *)(tp) && \
+ (tp)->t_state == TCPS_ESTABLISHED) { \
+ tp->t_flags |= TF_DELACK; \
+ (tp)->rcv_nxt += (ti)->ti_len; \
+ flags = (ti)->ti_flags & TH_FIN; \
+ tcpstat.tcps_rcvpack++;\
+ tcpstat.tcps_rcvbyte += (ti)->ti_len;\
+ sbappend(&(so)->so_rcv, (m)); \
+ sorwakeup(so); \
+ } else { \
+ (flags) = tcp_reass((tp), (ti), (m)); \
+ tp->t_flags |= TF_ACKNOW; \
+ } \
+}
+#endif
#ifndef TUBA_INCLUDE
int
@@ -573,6 +592,7 @@
*/
sbappend(&so->so_rcv, m);
sorwakeup(so);
+#ifdef TCP_ACK_HACK
/*
* If this is a short packet, then ACK now - with Nagel
* congestion avoidance sender won't send more until
@@ -584,6 +604,9 @@
} else {
tp->t_flags |= TF_DELACK;
}
+#else
+ tp->t_flags |= TF_DELACK;
+#endif
return;
}
}
Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
==============================================================================
--- trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/oskittcp/oskittcp/tcp_subr.c [iso-8859-1] Thu Aug 19
22:15:58 2010
@@ -560,6 +560,7 @@
tcp_rtlookup(inp)
struct inpcb *inp;
{
+#ifndef __REACTOS__
struct route *ro;
struct rtentry *rt;
@@ -576,7 +577,10 @@
rt = ro->ro_rt;
}
}
- return rt;
+ return rt;
+#else
+ return NULL;
+#endif
}
/*