From: Nick Mathewson Date: Sat, 28 May 2011 03:28:17 +0000 (-0400) Subject: Make the new http_connect_fail_test use a multicast addr, not broadcast X-Git-Tag: release-2.0.12-stable~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f47c15e7bac217f0b0282a6e535f03f26e1e9d9d;p=libevent Make the new http_connect_fail_test use a multicast addr, not broadcast Turns out that FreeBSD does _not_ give a ENETUNREACH error when told to make a TCP socket to 255.255.255.255, but it is quite happy to do so for 239.10.20.30. So that's what we'll do. Found by Robert Ransom and Dave Hart. --- diff --git a/test/regress_http.c b/test/regress_http.c index cf0fb971..0aef4d74 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -3040,9 +3040,9 @@ http_connection_fail_test(void *arg) evhttp_free(http); http = NULL; - /* Pick an unroutable address. The limited broadcast address should do - * when working with TCP. */ - evcon = evhttp_connection_base_new(data->base, NULL, "255.255.255.255", 80); + /* Pick an unroutable address. This administratively scoped multicast + * address should do when working with TCP. */ + evcon = evhttp_connection_base_new(data->base, NULL, "239.10.20.30", 80); tt_assert(evcon); /*