From a3024037007c4e92f1b31667ac06774bd95fa57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=C3=AFs=20Betts?= Date: Sun, 9 Jan 2022 22:31:02 +0100 Subject: [PATCH] Disable IPv6 and only bind to localhost --- nall/http/server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nall/http/server.cpp b/nall/http/server.cpp index 8786775c..4ff521ca 100644 --- a/nall/http/server.cpp +++ b/nall/http/server.cpp @@ -9,7 +9,7 @@ auto Server::open(uint port, const string &serviceName, const string &command) - } fd4 = socket(AF_INET, SOCK_STREAM, 0); - fd6 = socket(AF_INET6, SOCK_STREAM, 0); + fd6 = -1; // socket(AF_INET6, SOCK_STREAM, 0); if (!ipv4() && !ipv6()) return false; @@ -66,7 +66,7 @@ auto Server::open(uint port, const string &serviceName, const string &command) - } addrin4.sin_family = AF_INET; - addrin4.sin_addr.s_addr = htonl(INADDR_ANY); + addrin4.sin_addr.s_addr = inet_addr("127.0.0.1"); addrin4.sin_port = htons(port); addrin6.sin6_family = AF_INET6;