Bind dev server to ipv4 only
On systems that don't support ipv6, or systems that don't have an ipv6
address, binding to all ipv6 addresses can fail. Because this is just
the dev server, it's perfectly reasonable to limit to ipv4 addresses
only.
This failure has been reported by several people over time, but it was only
recently that I root caused this as their problem.
This should have no effect on the BMC itself, as the bmc is using socket
activation, and completely bypasses this code path.
Tested:
Launched bmcweb on a system that was previously failing because of a
bind error, and observed that I could launch bmcweb and have it work
correctly.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ife6b051aa62d62e1691c5221d8ddee0b9bd012c0
diff --git a/http/app.hpp b/http/app.hpp
index 023eabb..d5e2d2b 100644
--- a/http/app.hpp
+++ b/http/app.hpp
@@ -215,7 +215,7 @@
#else
uint16_t portUint = 80;
#endif
- std::string bindaddrStr = "::";
+ std::string bindaddrStr = "0.0.0.0";
int socketFd = -1;
Router router;