From ae8d436623109f315229ca9cc05715af362257b0 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 27 Jul 2015 17:10:47 -0700 Subject: [PATCH] test: use reserved IP in test-net-connect-timeout Use reserved IP in test-net-connect-timeout.js rather than arbitrary IP. PR-URL: https://github.com/nodejs/node/pull/2257 Fixes: https://github.com/nodejs/node/issues/2469 Reviewed By: Ben Noordhuis --- test/internet/test-net-connect-timeout.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/internet/test-net-connect-timeout.js b/test/internet/test-net-connect-timeout.js index 436d773182..b92d234852 100644 --- a/test/internet/test-net-connect-timeout.js +++ b/test/internet/test-net-connect-timeout.js @@ -15,9 +15,11 @@ var gotConnect = false; var T = 100; - -// 240.*.*.*.* is "reserved for future use" -var socket = net.createConnection(9999, '240.0.0.0'); +// 192.0.2.1 is part of subnet assigned as "TEST-NET" in RFC 5737. +// For use solely in documentation and example source code. +// In short, it should be unreachable. +// In practice, it's a network black hole. +var socket = net.createConnection(9999, '192.0.2.1'); socket.setTimeout(T);