+3465. [bug] Handle isolated reserved ports. [RT #31778]
+
3464. [maint] Updates to PKCS#11 openssl patches, supporting
versions 0.9.8x, 1.0.0j, 1.0.1c [RT #29749]
isc_sockaddr_setport(&localaddr_bound, prt);
result = open_socket(sockmgr, &localaddr_bound,
0, &sock);
- if (result == ISC_R_SUCCESS ||
- result != ISC_R_ADDRINUSE) {
- disp->localport = prt;
- *sockp = sock;
- return (result);
- }
+ /*
+ * Continue if the port choosen is already in use
+ * or the OS has reserved it.
+ */
+ if (result == ISC_R_NOPERM ||
+ result == ISC_R_ADDRINUSE)
+ continue;
+ disp->localport = prt;
+ *sockp = sock;
+ return (result);
}
/*