freebsd-ports/www/npm/files/extra-patch-bug-178881
Sunpoet Po-Chuan Hsieh c6bb5d1cd4 - Revert r386459
- Add workaround for i386 to deal with kernel bug 178881 [1]
  (PR/178881: getifaddrs(3) does not report IPv6 addresses properly in 32-bit compatibility mode)

PR:		198350 [1]
Submitted by:	Marcin Cieslak <saper@saper.info> [1]
Thanks to:	adamw, bdrewery
MFH:		2015Q2
2015-05-16 17:02:37 +00:00

30 lines
812 B
Text

--- lib/config/defaults.js.orig 2015-05-01 04:03:19 UTC
+++ lib/config/defaults.js
@@ -316,26 +316,7 @@ exports.types =
}
function getLocalAddresses () {
- var interfaces
- // #8094: some environments require elevated permissions to enumerate
- // interfaces, and synchronously throw EPERM when run without
- // elevated privileges
- try {
- interfaces = os.networkInterfaces()
- } catch (e) {
- interfaces = {}
- }
-
- return Object.keys(interfaces).map(function (nic) {
- return interfaces[nic].filter(function (addr) {
- return addr.family === 'IPv4'
- })
- .map(function (addr) {
- return addr.address
- })
- }).reduce(function (curr, next) {
- return curr.concat(next)
- }, []).concat(undefined)
+ return [ '127.0.0.1', undefined ]
}
exports.shorthands =