From 43f402c7f7ce5d71c0177251931fd73cfb8818a7 Mon Sep 17 00:00:00 2001 From: "vitaly.osipov@gmail.com" Date: Mon, 10 Jan 2011 00:31:17 +0000 Subject: [PATCH] fixes issue 240 including ipv6 interfaces and whatnot. git-svn-id: https://beef.googlecode.com/svn/trunk@688 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9 --- lib/console/banner.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/console/banner.rb b/lib/console/banner.rb index ae70155f1..a6a13d88b 100644 --- a/lib/console/banner.rb +++ b/lib/console/banner.rb @@ -17,7 +17,7 @@ module Console # create an array of the interfaces the framework is listening on if beef_host == '0.0.0.0' # the framework will listen on all interfaces - interfaces = Socket.getaddrinfo(Socket.gethostname, 'www', Socket::AF_INET, Socket::SOCK_STREAM).map { |x| x[3] } + interfaces = Socket.getaddrinfo(Socket.gethostname, 0, Socket::AF_UNSPEC, Socket::SOCK_STREAM, nil, Socket::AI_CANONNAME).map { |x| x[3] } interfaces = interfaces << "127.0.0.1" interfaces.uniq! else # the framework will listen on only one interface