diff options
-rw-r--r-- | src/lib/libcrypto/bio/b_sock.c | 6 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/bio/b_sock.c | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/libcrypto/bio/b_sock.c b/src/lib/libcrypto/bio/b_sock.c index ad261f065a..e14e7fedf8 100644 --- a/src/lib/libcrypto/bio/b_sock.c +++ b/src/lib/libcrypto/bio/b_sock.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: b_sock.c,v 1.47 2014/07/08 11:05:41 jsing Exp $ */ | 1 | /* $OpenBSD: b_sock.c,v 1.48 2014/07/08 11:08:37 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -310,7 +310,6 @@ again: | |||
310 | goto err; | 310 | goto err; |
311 | } | 311 | } |
312 | 312 | ||
313 | #ifdef SO_REUSEADDR | ||
314 | if (bind_mode == BIO_BIND_REUSEADDR) { | 313 | if (bind_mode == BIO_BIND_REUSEADDR) { |
315 | int i = 1; | 314 | int i = 1; |
316 | 315 | ||
@@ -318,9 +317,7 @@ again: | |||
318 | sizeof(i)); | 317 | sizeof(i)); |
319 | bind_mode = BIO_BIND_NORMAL; | 318 | bind_mode = BIO_BIND_NORMAL; |
320 | } | 319 | } |
321 | #endif | ||
322 | if (bind(s, &server.sa, addrlen) == -1) { | 320 | if (bind(s, &server.sa, addrlen) == -1) { |
323 | #ifdef SO_REUSEADDR | ||
324 | err_num = errno; | 321 | err_num = errno; |
325 | if ((bind_mode == BIO_BIND_REUSEADDR_IF_UNUSED) && | 322 | if ((bind_mode == BIO_BIND_REUSEADDR_IF_UNUSED) && |
326 | (err_num == EADDRINUSE)) { | 323 | (err_num == EADDRINUSE)) { |
@@ -350,7 +347,6 @@ again: | |||
350 | } | 347 | } |
351 | /* else error */ | 348 | /* else error */ |
352 | } | 349 | } |
353 | #endif | ||
354 | SYSerr(SYS_F_BIND, err_num); | 350 | SYSerr(SYS_F_BIND, err_num); |
355 | ERR_asprintf_error_data("port='%s'", host); | 351 | ERR_asprintf_error_data("port='%s'", host); |
356 | BIOerr(BIO_F_BIO_GET_ACCEPT_SOCKET, | 352 | BIOerr(BIO_F_BIO_GET_ACCEPT_SOCKET, |
diff --git a/src/lib/libssl/src/crypto/bio/b_sock.c b/src/lib/libssl/src/crypto/bio/b_sock.c index ad261f065a..e14e7fedf8 100644 --- a/src/lib/libssl/src/crypto/bio/b_sock.c +++ b/src/lib/libssl/src/crypto/bio/b_sock.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: b_sock.c,v 1.47 2014/07/08 11:05:41 jsing Exp $ */ | 1 | /* $OpenBSD: b_sock.c,v 1.48 2014/07/08 11:08:37 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -310,7 +310,6 @@ again: | |||
310 | goto err; | 310 | goto err; |
311 | } | 311 | } |
312 | 312 | ||
313 | #ifdef SO_REUSEADDR | ||
314 | if (bind_mode == BIO_BIND_REUSEADDR) { | 313 | if (bind_mode == BIO_BIND_REUSEADDR) { |
315 | int i = 1; | 314 | int i = 1; |
316 | 315 | ||
@@ -318,9 +317,7 @@ again: | |||
318 | sizeof(i)); | 317 | sizeof(i)); |
319 | bind_mode = BIO_BIND_NORMAL; | 318 | bind_mode = BIO_BIND_NORMAL; |
320 | } | 319 | } |
321 | #endif | ||
322 | if (bind(s, &server.sa, addrlen) == -1) { | 320 | if (bind(s, &server.sa, addrlen) == -1) { |
323 | #ifdef SO_REUSEADDR | ||
324 | err_num = errno; | 321 | err_num = errno; |
325 | if ((bind_mode == BIO_BIND_REUSEADDR_IF_UNUSED) && | 322 | if ((bind_mode == BIO_BIND_REUSEADDR_IF_UNUSED) && |
326 | (err_num == EADDRINUSE)) { | 323 | (err_num == EADDRINUSE)) { |
@@ -350,7 +347,6 @@ again: | |||
350 | } | 347 | } |
351 | /* else error */ | 348 | /* else error */ |
352 | } | 349 | } |
353 | #endif | ||
354 | SYSerr(SYS_F_BIND, err_num); | 350 | SYSerr(SYS_F_BIND, err_num); |
355 | ERR_asprintf_error_data("port='%s'", host); | 351 | ERR_asprintf_error_data("port='%s'", host); |
356 | BIOerr(BIO_F_BIO_GET_ACCEPT_SOCKET, | 352 | BIOerr(BIO_F_BIO_GET_ACCEPT_SOCKET, |