Subject: | Default only accepts connections from localhost (FIX SUGGESTED) |
Firstly thanks... I've found this module very useful.
Documentation says of the hostname property:
"If no address is specified, listens for any connection on the
designated port."
In fact, if no hostname is specified, the modules binds only to
connections from localhost. Connections from anywhere else are
rejected.
I used to following script to test the module:
use NetServer::Generic;
my $server = NetServer::Generic->new;
$server->port(9000);
$server->run();
Try connecting to port 9000 from localhost - works fine
Try connecting to port 9000 from another host - rejected
The Fix:
For line 589:
- "hostname" => "localhost",
+ "hostname" => undef,
or else add something to the docs to say "If you want the server to
accept connections from any host, set $server->hostname(undef)"
FYI I'm running NetServer-Generic-1.03, perl v5.8.8 on Linux
2.6.18-gentoo-r5 #8 SMP PREEMPT