[3.0] c703aff Change our chosen "bad_ip" to 192.0.2.255 which is a broadcast address from RFC5737's TEST-NET-1 and put a comment there to explain.

Tollef Fog Heen tfheen at varnish-cache.org
Mon Apr 22 13:26:59 CEST 2013


commit c703aff8ded54b61cd247e2fff65cbf244b72ddf
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Jul 30 16:33:48 2012 +0000

    Change our chosen "bad_ip" to 192.0.2.255 which is a broadcast address
    from RFC5737's TEST-NET-1 and put a comment there to explain.
    
    I fear this is a loosing battle, but at least this is more "official"
    than the previous "10.255.255.255" choice.
    
    Fixes #1159

diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c
index 72caa2a..5ceb4ed 100644
--- a/bin/varnishtest/vtc.c
+++ b/bin/varnishtest/vtc.c
@@ -566,7 +566,15 @@ exec_file(const char *fn, const char *script, const char *tmpdir,
 	cwd = getcwd(NULL, PATH_MAX);
 	macro_def(vltop, NULL, "pwd", cwd);
 	macro_def(vltop, NULL, "topbuild", "%s/%s", cwd, TOP_BUILDDIR);
-	macro_def(vltop, NULL, "bad_ip", "10.255.255.255");
+
+	/*
+	 * We need an IP number which will not repond, ever, and that is a
+	 * lot harder than it sounds.  This IP# is from RFC5737 and a
+	 * C-class broadcast at that.
+	 * If tests involving ${bad_ip} fails and you run linux, you should
+	 * check your /proc/sys/net/ipv4/ip_nonlocal_bind setting.
+	 */
+	macro_def(vltop, NULL, "bad_ip", "192.0.2.255");
 
 	/* Move into our tmpdir */
 	AZ(chdir(tmpdir));



More information about the varnish-commit mailing list