From 809dc32339aedbee63c64e23461c60e207ee53a7 Mon Sep 17 00:00:00 2001 From: Ali Sabil Date: Mon, 10 Jun 2013 09:53:32 +0200 Subject: Improve the detection of localhost interfaces for the HTTP test suite --- test/http_SUITE.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/http_SUITE.erl') diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl index 9470f44..01da7b2 100644 --- a/test/http_SUITE.erl +++ b/test/http_SUITE.erl @@ -422,9 +422,9 @@ body_to_chunks(ChunkSize, Body, Acc) -> get_mtu() -> {ok, Interfaces} = inet:getiflist(), - [LocalInterface | _] = lists:filter(fun - ("lo" ++ _) -> true; - (_) -> false + [LocalInterface | _ ] = lists:filter(fun(Interface) -> + {ok, [{flags, Flags}]} = inet:ifget(Interface, [flags]), + lists:member(loopback, Flags) end, Interfaces), {ok, [{mtu, MTU}]} = inet:ifget(LocalInterface, [mtu]), MTU. -- cgit v1.2.3