2013-04-09 23:14:36 +00:00
|
|
|
diff -up nss/cmd/httpserv/httpserv.c.539183 nss/cmd/httpserv/httpserv.c
|
|
|
|
--- nss/cmd/httpserv/httpserv.c.539183 2013-04-04 13:31:50.000000000 -0700
|
|
|
|
+++ nss/cmd/httpserv/httpserv.c 2013-04-04 15:44:24.965842070 -0700
|
2012-10-22 00:47:52 +00:00
|
|
|
@@ -661,14 +661,18 @@ getBoundListenSocket(unsigned short port
|
|
|
|
PRStatus prStatus;
|
|
|
|
PRNetAddr addr;
|
|
|
|
PRSocketOptionData opt;
|
|
|
|
+ PRUint16 socketDomain = PR_AF_INET;
|
|
|
|
|
|
|
|
- addr.inet.family = PR_AF_INET;
|
|
|
|
- addr.inet.ip = PR_INADDR_ANY;
|
|
|
|
- addr.inet.port = PR_htons(port);
|
|
|
|
+ if (PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, port, &addr) != PR_SUCCESS) {
|
|
|
|
+ errExit("PR_SetNetAddr");
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- listen_sock = PR_NewTCPSocket();
|
|
|
|
+ if (PR_GetEnv("NSS_USE_SDP")) {
|
|
|
|
+ socketDomain = PR_AF_INET_SDP;
|
|
|
|
+ }
|
|
|
|
+ listen_sock = PR_OpenTCPSocket(PR_AF_INET6);
|
|
|
|
if (listen_sock == NULL) {
|
|
|
|
- errExit("PR_NewTCPSocket");
|
|
|
|
+ errExit("PR_OpenTCPSocket error");
|
|
|
|
}
|
|
|
|
|
|
|
|
opt.option = PR_SockOpt_Nonblocking;
|
2013-04-09 23:14:36 +00:00
|
|
|
diff -up nss/cmd/selfserv/selfserv.c.539183 nss/cmd/selfserv/selfserv.c
|
|
|
|
--- nss/cmd/selfserv/selfserv.c.539183 2013-04-04 13:31:51.000000000 -0700
|
|
|
|
+++ nss/cmd/selfserv/selfserv.c 2013-04-04 15:44:24.967842088 -0700
|
|
|
|
@@ -1690,14 +1690,18 @@ getBoundListenSocket(unsigned short port
|
2011-10-08 19:04:26 +00:00
|
|
|
PRStatus prStatus;
|
|
|
|
PRNetAddr addr;
|
2011-02-24 23:05:17 +00:00
|
|
|
PRSocketOptionData opt;
|
2011-10-08 19:04:26 +00:00
|
|
|
+ PRUint16 socketDomain = PR_AF_INET;
|
2011-02-24 23:05:17 +00:00
|
|
|
|
|
|
|
- addr.inet.family = PR_AF_INET;
|
|
|
|
- addr.inet.ip = PR_INADDR_ANY;
|
|
|
|
- addr.inet.port = PR_htons(port);
|
|
|
|
+ if (PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, port, &addr) != PR_SUCCESS) {
|
|
|
|
+ errExit("PR_SetNetAddr");
|
|
|
|
+ }
|
|
|
|
|
2011-10-08 19:04:26 +00:00
|
|
|
- listen_sock = PR_NewTCPSocket();
|
|
|
|
+ if (PR_GetEnv("NSS_USE_SDP")) {
|
|
|
|
+ socketDomain = PR_AF_INET_SDP;
|
|
|
|
+ }
|
2011-02-24 23:05:17 +00:00
|
|
|
+ listen_sock = PR_OpenTCPSocket(PR_AF_INET6);
|
|
|
|
if (listen_sock == NULL) {
|
2011-10-08 19:04:26 +00:00
|
|
|
- errExit("PR_NewTCPSocket");
|
|
|
|
+ errExit("PR_OpenTCPSocket error");
|
2011-02-24 23:05:17 +00:00
|
|
|
}
|
2011-10-08 19:04:26 +00:00
|
|
|
|
|
|
|
opt.option = PR_SockOpt_Nonblocking;
|