summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/inet/tcp/tcp.c
diff options
context:
space:
mode:
authorsommerfe <none@none>2006-06-22 12:52:27 -0700
committersommerfe <none@none>2006-06-22 12:52:27 -0700
commit5d0bc3ededb82d77f7c33d8f58e517a837ba5140 (patch)
treef3b0f2cc21773e13d562f20191626012f1201473 /usr/src/uts/common/inet/tcp/tcp.c
parentabf8481b415d552f9b7ab854dd6032fd972a49ac (diff)
downloadillumos-joyent-5d0bc3ededb82d77f7c33d8f58e517a837ba5140.tar.gz
PSARC 2006/073 PF_ROUTE: Include interface name with RTM_NEWADDR/RTM_DELADDR
PSARC 2006/084 SO_ALLZONES 4963315 Should make IKE work for non-global zones 4984263 in.iked removes server entities when unnumbered interfaces go away 5024997 system daemons need a way to receive packets from all zones 6218993 PF_ROUTE: RTM_NEWADDR/RTM_DELADDR should include interface name via RTA_IFP 6422023 sctp doesn't need shadow copies of conn_t socket option bits 6426542 Comment about ipp_use_min_mtu got lost and wandered into conn_t 6430869 in.iked should ignore loopback addresses, not loopback interfaces 6438186 SCTP handling of getsockopt( .. SO_MAC_EXEMPT) is oddly inconsistent with TCP, UDP
Diffstat (limited to 'usr/src/uts/common/inet/tcp/tcp.c')
-rw-r--r--usr/src/uts/common/inet/tcp/tcp.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/usr/src/uts/common/inet/tcp/tcp.c b/usr/src/uts/common/inet/tcp/tcp.c
index 17a35961d8..5ae25e49d5 100644
--- a/usr/src/uts/common/inet/tcp/tcp.c
+++ b/usr/src/uts/common/inet/tcp/tcp.c
@@ -3511,7 +3511,7 @@ tcp_bindi(tcp_t *tcp, in_port_t port, const in6_addr_t *laddr,
* privilege as being in all zones, as there's
* otherwise no way to identify the right receiver.
*/
- if (lconnp->conn_zoneid != zoneid &&
+ if (!IPCL_ZONE_MATCH(ltcp->tcp_connp, zoneid) &&
!lconnp->conn_mac_exempt &&
!connp->conn_mac_exempt)
continue;
@@ -5341,7 +5341,7 @@ tcp_update_label(tcp_t *tcp, const cred_t *cr)
* reference is dropped by the squeue framework.
*
* 3) The ref on listener placed in 1 above is dropped in tcp_accept_finish
- *
+ *
* The reference must be released by the same entity that added the reference
* In the above scheme, the eager is the entity that adds and releases the
* references. Note that tcp_accept_finish executes in the squeue of the eager
@@ -5373,10 +5373,10 @@ tcp_update_label(tcp_t *tcp, const cred_t *cr)
* based on the ref placed on eager before sending T_conn_ind.
* The only entity that can negate this refhold is a listener close
* which is mutually exclusive with an active acceptor stream.
- *
+ *
* Eager's reference on the listener
* ===================================
- *
+ *
* If the accept happens (even on a closed eager) the eager drops its
* reference on the listener at the start of tcp_accept_finish. If the
* eager is killed due to an incoming RST before the T_conn_ind is sent up,
@@ -9587,6 +9587,9 @@ tcp_opt_get(queue_t *q, int level, int name, uchar_t *ptr)
*i1 = tcp->tcp_snd_zcopy_on ?
SO_SND_COPYAVOID : 0;
break;
+ case SO_ALLZONES:
+ *i1 = connp->conn_allzones ? 1 : 0;
+ break;
case SO_ANON_MLP:
*i1 = connp->conn_anon_mlp;
break;
@@ -10072,6 +10075,9 @@ tcp_opt_set(queue_t *q, uint_t optset_context, int level, int name,
tcp->tcp_snd_zcopy_aware = 1;
}
break;
+ case SO_ALLZONES:
+ /* Handled at the IP level */
+ return (-EINVAL);
case SO_ANON_MLP:
if (!checkonly) {
mutex_enter(&connp->conn_lock);
@@ -22613,7 +22619,7 @@ tcp_reserved_port_add(int size, in_port_t *lo_port, in_port_t *hi_port)
mutex_enter(&tbf->tf_lock);
for (tcp = tbf->tf_tcp; tcp != NULL;
tcp = tcp->tcp_bind_hash) {
- if (zoneid == tcp->tcp_connp->conn_zoneid &&
+ if (IPCL_ZONE_MATCH(tcp->tcp_connp, zoneid) &&
net_port == tcp->tcp_lport) {
/*
* A port is already bound. Search again