diff options
author | anders <Anders.Persson@Sun.COM> | 2009-01-23 16:32:20 -0800 |
---|---|---|
committer | anders <Anders.Persson@Sun.COM> | 2009-01-23 16:32:20 -0800 |
commit | 3986c91e1475e8a41e75969310e5abe7fb516983 (patch) | |
tree | 50253aaeca568ab73244a7817282442b404b2a64 /usr/src | |
parent | 53560dfa94d868e9016a1b90f971fb538dc2009a (diff) | |
download | illumos-joyent-3986c91e1475e8a41e75969310e5abe7fb516983.tar.gz |
6796699 iscsi client broken: failed to receive login response
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/fs/sockfs/sockcommon_sops.c | 7 | ||||
-rw-r--r-- | usr/src/uts/common/inet/ip/icmp_opt_data.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/inet/ip/rts_opt_data.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/inet/tcp/tcp_opt_data.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/inet/udp/udp_opt_data.c | 4 |
5 files changed, 21 insertions, 2 deletions
diff --git a/usr/src/uts/common/fs/sockfs/sockcommon_sops.c b/usr/src/uts/common/fs/sockfs/sockcommon_sops.c index ce9446f044..fb240939ee 100644 --- a/usr/src/uts/common/fs/sockfs/sockcommon_sops.c +++ b/usr/src/uts/common/fs/sockfs/sockcommon_sops.c @@ -764,6 +764,8 @@ so_setsockopt(struct sonode *so, int level, int option_name, const void *optval, socklen_t optlen, struct cred *cr) { int error = 0; + struct timeval tl; + const void *opt = optval; SO_BLOCK_FALLBACK(so, SOP_SETSOCKOPT(so, level, option_name, optval, optlen, cr)); @@ -786,7 +788,6 @@ so_setsockopt(struct sonode *so, int level, int option_name, * know them. For those protocols which don't care * these two options, simply return 0. */ - struct timeval tl; clock_t t_usec; if (get_udatamodel() == DATAMODEL_NONE || @@ -805,6 +806,8 @@ so_setsockopt(struct sonode *so, int level, int option_name, TIMEVAL32_TO_TIMEVAL(&tl, (struct timeval32 *)optval); } + opt = &tl; + optlen = sizeof (tl); t_usec = tl.tv_sec * 1000 * 1000 + tl.tv_usec; mutex_enter(&so->so_lock); if (option_name == SO_RCVTIMEO) @@ -826,7 +829,7 @@ so_setsockopt(struct sonode *so, int level, int option_name, } } error = (*so->so_downcalls->sd_setsockopt) - (so->so_proto_handle, level, option_name, optval, optlen, cr); + (so->so_proto_handle, level, option_name, opt, optlen, cr); done: SO_UNBLOCK_FALLBACK(so); return (error); diff --git a/usr/src/uts/common/inet/ip/icmp_opt_data.c b/usr/src/uts/common/inet/ip/icmp_opt_data.c index 24ba9d689c..2c7f37de88 100644 --- a/usr/src/uts/common/inet/ip/icmp_opt_data.c +++ b/usr/src/uts/common/inet/ip/icmp_opt_data.c @@ -81,6 +81,10 @@ opdes_t icmp_opt_arr[] = { { SO_TYPE, SOL_SOCKET, OA_R, OA_R, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { SO_SNDBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { SO_RCVBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, +{ SO_SNDTIMEO, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, + sizeof (struct timeval), 0 }, +{ SO_RCVTIMEO, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, + sizeof (struct timeval), 0 }, { SO_DGRAM_ERRIND, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { SO_TIMESTAMP, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 diff --git a/usr/src/uts/common/inet/ip/rts_opt_data.c b/usr/src/uts/common/inet/ip/rts_opt_data.c index 7397b53b9e..8a96edb668 100644 --- a/usr/src/uts/common/inet/ip/rts_opt_data.c +++ b/usr/src/uts/common/inet/ip/rts_opt_data.c @@ -58,6 +58,10 @@ opdes_t rts_opt_arr[] = { { SO_TYPE, SOL_SOCKET, OA_R, OA_R, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { SO_SNDBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { SO_RCVBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, +{ SO_SNDTIMEO, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, + sizeof (struct timeval), 0 }, +{ SO_RCVTIMEO, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, + sizeof (struct timeval), 0 }, { SO_PROTOTYPE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { SO_DOMAIN, SOL_SOCKET, OA_R, OA_R, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { RT_AWARE, SOL_ROUTE, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 }, diff --git a/usr/src/uts/common/inet/tcp/tcp_opt_data.c b/usr/src/uts/common/inet/tcp/tcp_opt_data.c index e2314f8104..167d3cc2c3 100644 --- a/usr/src/uts/common/inet/tcp/tcp_opt_data.c +++ b/usr/src/uts/common/inet/tcp/tcp_opt_data.c @@ -69,6 +69,10 @@ opdes_t tcp_opt_arr[] = { { SO_TYPE, SOL_SOCKET, OA_R, OA_R, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { SO_SNDBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { SO_RCVBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, +{ SO_SNDTIMEO, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, + sizeof (struct timeval), 0 }, +{ SO_RCVTIMEO, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, + sizeof (struct timeval), 0 }, { SO_DGRAM_ERRIND, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { SO_SND_COPYAVOID, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 }, diff --git a/usr/src/uts/common/inet/udp/udp_opt_data.c b/usr/src/uts/common/inet/udp/udp_opt_data.c index 65729b82f1..5cad013cb6 100644 --- a/usr/src/uts/common/inet/udp/udp_opt_data.c +++ b/usr/src/uts/common/inet/udp/udp_opt_data.c @@ -65,6 +65,10 @@ opdes_t udp_opt_arr[] = { { SO_TYPE, SOL_SOCKET, OA_R, OA_R, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { SO_SNDBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { SO_RCVBUF, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, +{ SO_SNDTIMEO, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, + sizeof (struct timeval), 0 }, +{ SO_RCVTIMEO, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, + sizeof (struct timeval), 0 }, { SO_DGRAM_ERRIND, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 }, { SO_RECVUCRED, SOL_SOCKET, OA_RW, OA_RW, OP_NP, OP_PASSNEXT, sizeof (int), 0 |