summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e82b611)
raw | patch | inline | side by side (parent: e82b611)
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Sat, 19 Sep 2009 05:44:10 +0000 (01:44 -0400) | ||
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Sat, 19 Sep 2009 06:08:51 +0000 (02:08 -0400) |
NEWS | patch | blob | history | |
plugins-scripts/check_ircd.pl | patch | blob | history |
index 9e2906f6f404fab932616dc57ecd948df8deaa83..e6df5797af8bfa5d7835c69c6c5f383a984c127b 100644 (file)
--- a/NEWS
+++ b/NEWS
This file documents the major additions and syntax changes between releases.
+1.4.15 ...
+ Fix check_ircd binding to wrong interface (#668778)
+
1.4.14 16th September 2009
check_http has options to specify the HTTP method (#2155152)
check_users thresholds were not working exactly as documented (>= rather than >)
index cc730cff3d46e1089899cfff750ca825ae0f2033..3fbce2e43b1881344653487d421ded19503900bc 100755 (executable)
sub print_help ();
sub print_usage ();
sub connection ($$$$);
-sub bindRemote ($$$);
+sub bindRemote ($$);
# -------------------------------------------------------------[ Enviroment ]--
# -------------------------------------------------------------[ bindRemote ]--
-sub bindRemote ($$$)
+sub bindRemote ($$)
{
- my ($in_remotehost, $in_remoteport, $in_hostname) = @_;
+ my ($in_remotehost, $in_remoteport) = @_;
my $proto = getprotobyname('tcp');
my $sockaddr;
- my $this;
- my $thisaddr = gethostbyname($in_hostname);
my $that;
my ($name, $aliases,$type,$len,$thataddr) = gethostbyname($in_remotehost);
-# ($name,$aliases,$type,$len,$thisaddr) = gethostbyname($in_hostname);
if (!socket(ClientSocket,AF_INET, SOCK_STREAM, $proto)) {
print "IRCD UNKNOWN: Could not start socket ($!)\n";
exit $ERRORS{"UNKNOWN"};
}
$sockaddr = 'S n a4 x8';
- $this = pack($sockaddr, AF_INET, 0, $thisaddr);
$that = pack($sockaddr, AF_INET, $in_remoteport, $thataddr);
- if (!bind(ClientSocket, $this)) {
- print "IRCD UNKNOWN: Could not bind socket ($!)\n";
- exit $ERRORS{"UNKNOWN"};
- }
if (!connect(ClientSocket, $that)) {
print "IRCD UNKNOWN: Could not connect socket ($!)\n";
exit $ERRORS{"UNKNOWN"};
alarm($TIMEOUT);
- chomp($hostname = `/bin/hostname`);
- $hostname = $1 if ($hostname =~ /([-.a-zA-Z0-9]+)/);
my ($name, $alias, $proto) = getprotobyname('tcp');
- print "MAIN(debug): hostname = $hostname\n" if $verbose;
- print "MAIN(debug): binding to remote host: $remotehost -> $remoteport -> $hostname\n" if $verbose;
- my $ClientSocket = &bindRemote($remotehost,$remoteport,$hostname);
+ print "MAIN(debug): binding to remote host: $remotehost -> $remoteport\n" if $verbose;
+ my $ClientSocket = &bindRemote($remotehost,$remoteport);
print ClientSocket "NICK $NICK\nUSER $USER_INFO\n";