Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4dc660e
build: do not generate support for libuv's probes
Dec 3, 2014
20a7088
deps: update libuv to 1.0.2
saghul Dec 9, 2014
8708c7a
test: mark more tests as flaky
orangemocha Dec 10, 2014
946cec7
lib,src: fix spawnSync ignoring its 'env' option
juamedgod Oct 14, 2014
4bba870
test: add test for spawnSync() env option
cjihrig Dec 9, 2014
5b9e5bd
doc: clarify create{Read,Write}Stream fd option
benjamincburns Jul 26, 2014
6f6a979
zlib: support concatenated gzip files
eendeego Sep 9, 2014
e93ff4f
debugger: fix unhandled error in setBreakpoint
bajtos Nov 4, 2013
93533e9
src: fix windows build error
bnoordhuis Nov 11, 2014
9158666
stream: switch _writableState.buffer to queue
chrisdickinson Dec 4, 2014
890baa0
doc: add details for http res/req end callback
JacksonTian Dec 10, 2014
6a03fce
url: improve parsing speed
CGavrila Oct 28, 2014
d8586ea
lib: introduce process module
Dec 30, 2014
8b04161
doc: util: document --trace-deprecation
bnoordhuis Dec 21, 2014
d5c7a97
doc: added TC meeting minutes 2014-12-17
rvagg Dec 17, 2014
a308395
build: i18n: add icu config options
srl295 Nov 13, 2014
261706e
doc: added TC meeting minutes 2014-12-30
rvagg Jan 2, 2015
8cfbeed
docs: update to authors file
srl295 Jan 3, 2015
b636ba8
net: make connect() input validation synchronous
cjihrig Jan 3, 2015
372a2f5
smalloc: fix bad assert for zero length data
trevnorris Jan 5, 2015
94e1475
Merge remote-tracking branch 'joyent/v0.12' into v1.x
bnoordhuis Jan 5, 2015
eaed2a1
deps: update libuv to 1.2.0
bnoordhuis Jan 5, 2015
52e600a
test: don't assume broadcast traffic is unfiltered
bnoordhuis Dec 29, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: don't assume broadcast traffic is unfiltered
parallel/test-dgram-broadcast-multi-process assumes non-local broadcast
traffic is unfiltered, an assumption that fails with, for example, the
default Fedora firewall rules.  Use a loopback interface instead.

Fixes: #219
PR-URL: #220
Reviewed-By: Fedor Indutny <[email protected]>
  • Loading branch information
bnoordhuis committed Jan 6, 2015
commit 52e600a9c8655f578fae55d85e778b58d731201a
18 changes: 2 additions & 16 deletions test/parallel/test-dgram-broadcast-multi-process.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ var common = require('../common'),
assert = require('assert'),
dgram = require('dgram'),
util = require('util'),
networkInterfaces = require('os').networkInterfaces(),
Buffer = require('buffer').Buffer,
fork = require('child_process').fork,
LOCAL_BROADCAST_HOST = '255.255.255.255',
Expand All @@ -35,19 +34,6 @@ var common = require('../common'),
new Buffer('Fourth message to send')
];

// take the first non-internal interface as the address for binding
get_bindAddress: for (var name in networkInterfaces) {
var interfaces = networkInterfaces[name];
for(var i = 0; i < interfaces.length; i++) {
var localInterface = interfaces[i];
if (!localInterface.internal && localInterface.family === 'IPv4') {
var bindAddress = localInterface.address;
break get_bindAddress;
}
}
}
assert.ok(bindAddress);

if (process.argv[2] !== 'child') {
var workers = {},
listeners = 3,
Expand Down Expand Up @@ -164,7 +150,7 @@ if (process.argv[2] !== 'child') {

// bind the address explicitly for sending
// INADDR_BROADCAST to only one interface
sendSocket.bind(common.PORT, bindAddress);
sendSocket.bind(common.PORT, '127.0.0.1');
sendSocket.on('listening', function () {
sendSocket.setBroadcast(true);
});
Expand Down Expand Up @@ -211,7 +197,7 @@ if (process.argv[2] === 'child') {

listenSocket.on('message', function(buf, rinfo) {
// receive udp messages only sent from parent
if (rinfo.address !== bindAddress) return;
if (rinfo.address !== '127.0.0.1') return;

console.error('[CHILD] %s received %s from %j',
process.pid,
Expand Down