[OSKITTCP]

- Disable routing because oskit needs to let our code do that
- Comment out the ACK hack and restore the default BSD behavior

svn path=/trunk/; revision=48569
This commit is contained in:
Cameron Gutman
2010-08-19 22:15:58 +00:00
parent 6a0074f795
commit 8d8399c2e5
3 changed files with 29 additions and 1 deletions
@@ -129,6 +129,7 @@ int OskitTCPSocket( void *context,
if( !error ) {
so->so_connection = context;
so->so_state |= SS_NBIO;
so->so_options |= SO_DONTROUTE;
*aso = so;
}
OSKUnlock();
@@ -84,6 +84,7 @@ struct inpcbinfo tcbinfo;
* 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 @@ struct inpcbinfo tcbinfo;
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 @@ findpcb:
*/
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 @@ findpcb:
} else {
tp->t_flags |= TF_DELACK;
}
#else
tp->t_flags |= TF_DELACK;
#endif
return;
}
}
@@ -560,6 +560,7 @@ struct rtentry *
tcp_rtlookup(inp)
struct inpcb *inp;
{
#ifndef __REACTOS__
struct route *ro;
struct rtentry *rt;
@@ -576,7 +577,10 @@ tcp_rtlookup(inp)
rt = ro->ro_rt;
}
}
return rt;
return rt;
#else
return NULL;
#endif
}
/*