From 403e6bac61ed5d509aeda5b49557481ac88bc08c Mon Sep 17 00:00:00 2001 From: minima Date: Sat, 21 Sep 2002 14:05:00 +0000 Subject: [PATCH] added a check that connect ip addresses resolve --- Changes | 2 ++ perl/Msg.pm | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Changes b/Changes index 84c06d8a..9c0dfc99 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +21Sep02======================================================================= +1. make some detail changes for connects out in Msg.pm 17Sep02======================================================================= 1. Added shu command for Charlie's (K1XX) benefit (together with the rest of our butterfingered sysops) who miss the '/' out of sh/u frequently enough diff --git a/perl/Msg.pm b/perl/Msg.pm index ef43b0bc..cf15ff76 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -212,7 +212,10 @@ sub connect { blocking($sock, 0); $conn->{blocking} = 0; + # does the host resolve? my $ip = gethostbyname($to_host); + return undef unless $ip; + # my $r = $sock->connect($to_port, $ip); my $r = connect($sock, pack_sockaddr_in($to_port, $ip)); return undef unless $r || _err_will_block($!); -- 2.43.0