diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | canohost.c | 4 | ||||
-rw-r--r-- | channels.c | 9 | ||||
-rw-r--r-- | packet.c | 6 | ||||
-rw-r--r-- | sshd.c | 10 |
5 files changed, 18 insertions, 16 deletions
@@ -14,6 +14,9 @@ | |||
14 | - stevesk@cvs.openbsd.org 2002/02/26 20:03:51 | 14 | - stevesk@cvs.openbsd.org 2002/02/26 20:03:51 |
15 | [misc.c] | 15 | [misc.c] |
16 | use socklen_t | 16 | use socklen_t |
17 | - stevesk@cvs.openbsd.org 2002/02/27 21:23:13 | ||
18 | [canohost.c channels.c packet.c sshd.c] | ||
19 | remove unneeded casts in [gs]etsockopt(); ok markus@ | ||
17 | 20 | ||
18 | 20020226 | 21 | 20020226 |
19 | - (tim) Bug 12 [configure.ac] add sys/bitypes.h to int64_t tests | 22 | - (tim) Bug 12 [configure.ac] add sys/bitypes.h to int64_t tests |
@@ -7745,4 +7748,4 @@ | |||
7745 | - Wrote replacements for strlcpy and mkdtemp | 7748 | - Wrote replacements for strlcpy and mkdtemp |
7746 | - Released 1.0pre1 | 7749 | - Released 1.0pre1 |
7747 | 7750 | ||
7748 | $Id: ChangeLog,v 1.1894 2002/03/05 01:28:14 mouring Exp $ | 7751 | $Id: ChangeLog,v 1.1895 2002/03/05 01:31:28 mouring Exp $ |
diff --git a/canohost.c b/canohost.c index 5eb67f676..03005aa29 100644 --- a/canohost.c +++ b/canohost.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: canohost.c,v 1.30 2002/01/29 14:32:03 markus Exp $"); | 15 | RCSID("$OpenBSD: canohost.c,v 1.31 2002/02/27 21:23:13 stevesk Exp $"); |
16 | 16 | ||
17 | #include "packet.h" | 17 | #include "packet.h" |
18 | #include "xmalloc.h" | 18 | #include "xmalloc.h" |
@@ -154,7 +154,7 @@ check_ip_options(int socket, char *ipaddr) | |||
154 | else | 154 | else |
155 | ipproto = IPPROTO_IP; | 155 | ipproto = IPPROTO_IP; |
156 | option_size = sizeof(options); | 156 | option_size = sizeof(options); |
157 | if (getsockopt(socket, ipproto, IP_OPTIONS, (void *)options, | 157 | if (getsockopt(socket, ipproto, IP_OPTIONS, options, |
158 | &option_size) >= 0 && option_size != 0) { | 158 | &option_size) >= 0 && option_size != 0) { |
159 | text[0] = '\0'; | 159 | text[0] = '\0'; |
160 | for (i = 0; i < option_size; i++) | 160 | for (i = 0; i < option_size; i++) |
diff --git a/channels.c b/channels.c index 325f278f0..d5a24311c 100644 --- a/channels.c +++ b/channels.c | |||
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: channels.c,v 1.169 2002/02/24 19:59:42 stevesk Exp $"); | 42 | RCSID("$OpenBSD: channels.c,v 1.170 2002/02/27 21:23:13 stevesk Exp $"); |
43 | 43 | ||
44 | #include "ssh.h" | 44 | #include "ssh.h" |
45 | #include "ssh1.h" | 45 | #include "ssh1.h" |
@@ -1184,8 +1184,7 @@ channel_post_connecting(Channel *c, fd_set * readset, fd_set * writeset) | |||
1184 | socklen_t sz = sizeof(err); | 1184 | socklen_t sz = sizeof(err); |
1185 | 1185 | ||
1186 | if (FD_ISSET(c->sock, writeset)) { | 1186 | if (FD_ISSET(c->sock, writeset)) { |
1187 | if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, (char *)&err, | 1187 | if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, &err, &sz) < 0) { |
1188 | &sz) < 0) { | ||
1189 | err = errno; | 1188 | err = errno; |
1190 | error("getsockopt SO_ERROR failed"); | 1189 | error("getsockopt SO_ERROR failed"); |
1191 | } | 1190 | } |
@@ -2036,10 +2035,10 @@ channel_setup_fwd_listener(int type, const char *listen_addr, u_short listen_por | |||
2036 | * Set socket options. We would like the socket to disappear | 2035 | * Set socket options. We would like the socket to disappear |
2037 | * as soon as it has been closed for whatever reason. | 2036 | * as soon as it has been closed for whatever reason. |
2038 | */ | 2037 | */ |
2039 | setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)); | 2038 | setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); |
2040 | linger.l_onoff = 1; | 2039 | linger.l_onoff = 1; |
2041 | linger.l_linger = 5; | 2040 | linger.l_linger = 5; |
2042 | setsockopt(sock, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof(linger)); | 2041 | setsockopt(sock, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger)); |
2043 | debug("Local forwarding listening on %s port %s.", ntop, strport); | 2042 | debug("Local forwarding listening on %s port %s.", ntop, strport); |
2044 | 2043 | ||
2045 | /* Bind the socket to the address. */ | 2044 | /* Bind the socket to the address. */ |
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: packet.c,v 1.89 2002/02/24 16:58:32 markus Exp $"); | 40 | RCSID("$OpenBSD: packet.c,v 1.90 2002/02/27 21:23:13 stevesk Exp $"); |
41 | 41 | ||
42 | #include "xmalloc.h" | 42 | #include "xmalloc.h" |
43 | #include "buffer.h" | 43 | #include "buffer.h" |
@@ -1218,7 +1218,7 @@ packet_set_interactive(int interactive) | |||
1218 | #if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN) | 1218 | #if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN) |
1219 | if (packet_connection_is_ipv4()) { | 1219 | if (packet_connection_is_ipv4()) { |
1220 | if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, | 1220 | if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, |
1221 | (void *) &lowdelay, sizeof(lowdelay)) < 0) | 1221 | &lowdelay, sizeof(lowdelay)) < 0) |
1222 | error("setsockopt IPTOS_LOWDELAY: %.100s", | 1222 | error("setsockopt IPTOS_LOWDELAY: %.100s", |
1223 | strerror(errno)); | 1223 | strerror(errno)); |
1224 | } | 1224 | } |
@@ -1230,7 +1230,7 @@ packet_set_interactive(int interactive) | |||
1230 | * IPTOS_THROUGHPUT. | 1230 | * IPTOS_THROUGHPUT. |
1231 | */ | 1231 | */ |
1232 | #if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN) | 1232 | #if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN) |
1233 | if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &throughput, | 1233 | if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, &throughput, |
1234 | sizeof(throughput)) < 0) | 1234 | sizeof(throughput)) < 0) |
1235 | error("setsockopt IPTOS_THROUGHPUT: %.100s", strerror(errno)); | 1235 | error("setsockopt IPTOS_THROUGHPUT: %.100s", strerror(errno)); |
1236 | #endif | 1236 | #endif |
@@ -40,7 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | RCSID("$OpenBSD: sshd.c,v 1.227 2002/02/24 16:09:52 stevesk Exp $"); | 43 | RCSID("$OpenBSD: sshd.c,v 1.228 2002/02/27 21:23:13 stevesk Exp $"); |
44 | 44 | ||
45 | #include <openssl/dh.h> | 45 | #include <openssl/dh.h> |
46 | #include <openssl/bn.h> | 46 | #include <openssl/bn.h> |
@@ -900,11 +900,11 @@ main(int ac, char **av) | |||
900 | * close. | 900 | * close. |
901 | */ | 901 | */ |
902 | setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, | 902 | setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, |
903 | (void *) &on, sizeof(on)); | 903 | &on, sizeof(on)); |
904 | linger.l_onoff = 1; | 904 | linger.l_onoff = 1; |
905 | linger.l_linger = 5; | 905 | linger.l_linger = 5; |
906 | setsockopt(listen_sock, SOL_SOCKET, SO_LINGER, | 906 | setsockopt(listen_sock, SOL_SOCKET, SO_LINGER, |
907 | (void *) &linger, sizeof(linger)); | 907 | &linger, sizeof(linger)); |
908 | 908 | ||
909 | debug("Bind to port %s on %s.", strport, ntop); | 909 | debug("Bind to port %s on %s.", strport, ntop); |
910 | 910 | ||
@@ -1150,11 +1150,11 @@ main(int ac, char **av) | |||
1150 | /* setsockopt(sock_in, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)); */ | 1150 | /* setsockopt(sock_in, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)); */ |
1151 | linger.l_onoff = 1; | 1151 | linger.l_onoff = 1; |
1152 | linger.l_linger = 5; | 1152 | linger.l_linger = 5; |
1153 | setsockopt(sock_in, SOL_SOCKET, SO_LINGER, (void *) &linger, sizeof(linger)); | 1153 | setsockopt(sock_in, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger)); |
1154 | 1154 | ||
1155 | /* Set keepalives if requested. */ | 1155 | /* Set keepalives if requested. */ |
1156 | if (options.keepalives && | 1156 | if (options.keepalives && |
1157 | setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, | 1157 | setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on, |
1158 | sizeof(on)) < 0) | 1158 | sizeof(on)) < 0) |
1159 | error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno)); | 1159 | error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno)); |
1160 | 1160 | ||