summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/inet/tcp_impl.h
diff options
context:
space:
mode:
authorvi117747 <none@none>2007-05-24 12:17:11 -0700
committervi117747 <none@none>2007-05-24 12:17:11 -0700
commit1d19ca101f1c458100349d59ba2d115d8e2c6f9d (patch)
tree2ed84c4bcd25a695a624f77a879e9adfa1433502 /usr/src/uts/common/inet/tcp_impl.h
parent9c7f0c7949f4f8c13342ed0167ea42f8d77b5f21 (diff)
downloadillumos-joyent-1d19ca101f1c458100349d59ba2d115d8e2c6f9d.tar.gz
6349696 PANIC: assertion failed: peer_tcp->tcp_loopback && peer_tcp->tcp_loopback_peer == NULL
6350527 assertion failed: !(flags & > >>TH_MARKNEXT_NEEDED), file: ../../common/inet/tcp/tcp.c 6531423 SCTP_IPIF_INSERT is adrift 6539189 IFF_COS_ENABLED can be changed by SIOCS[L]IFFLAGS 6546661 sctp_update_ipif_addr() panics if passed an ipif tied to an unknown ill 6546662 sctp's ill caching cannot handle interface index changes 6553898 Page fault during multithreaded SCTP stress test
Diffstat (limited to 'usr/src/uts/common/inet/tcp_impl.h')
-rw-r--r--usr/src/uts/common/inet/tcp_impl.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/usr/src/uts/common/inet/tcp_impl.h b/usr/src/uts/common/inet/tcp_impl.h
index 2f31dc531a..cfbbe84e3a 100644
--- a/usr/src/uts/common/inet/tcp_impl.h
+++ b/usr/src/uts/common/inet/tcp_impl.h
@@ -109,6 +109,41 @@ extern "C" {
}
/*
+ * Before caching the conn IRE, we need to make sure certain TCP
+ * states are in sync with the ire. The mismatch could occur if the
+ * TCP state has been set in tcp_adapt_ire() using a different IRE,
+ * e.g if an address was not present during an initial connect(),
+ * tcp_adapt_ire() will set the state using the interface route.
+ * Subsequently, if the address is added to the local machine, the
+ * retransmitted SYN will get the correct (loopback) IRE, but the TCP
+ * state (tcp_loopback and tcp_localnet) will remain out of sync.
+ * This is especially an issue with TCP fusion which relies on the
+ * TCP state to be accurate.
+ *
+ * This check/change should be made only if the TCP is not yet in
+ * the established state, else it would lead to inconsistencies.
+ */
+#define TCP_CHECK_IREINFO(tcp, ire) { \
+ if ((tcp)->tcp_state < TCPS_ESTABLISHED) { \
+ if (((ire)->ire_type & (IRE_LOOPBACK | \
+ IRE_LOCAL)) && !(tcp)->tcp_loopback) { \
+ (tcp)->tcp_loopback = B_TRUE; \
+ } else if ((tcp)->tcp_loopback && \
+ !((ire)->ire_type & (IRE_LOOPBACK | IRE_LOCAL))) { \
+ (tcp)->tcp_loopback = B_FALSE; \
+ } \
+ if ((tcp)->tcp_ipversion == IPV4_VERSION) { \
+ (tcp)->tcp_localnet = \
+ ((ire)->ire_gateway_addr == 0); \
+ } else { \
+ (tcp)->tcp_localnet = \
+ IN6_IS_ADDR_UNSPECIFIED( \
+ &(ire)->ire_gateway_addr_v6); \
+ } \
+ } \
+}
+
+/*
* Write-side flow-control is implemented via the per instance STREAMS
* write-side Q by explicitly setting QFULL to stop the flow of mblk_t(s)
* and clearing QFULL and calling qbackenable() to restart the flow based