LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: ldirectord checktype=connect false positive

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: ldirectord checktype=connect false positive
From: "Graham David Purcocks M.A.(Oxon.)" <grahamp@xxxxxxxxxxxxx>
Date: Tue, 20 Sep 2005 17:40:24 +0100
Yes. It's Ultramonkey V3.

Surprising if the CVS is worse than that :(

The fact it uses $sock rather then $result means its different code.

Ah. Whats your ld_open_socket look like. Maybe the check is in there.
See the close is within ld_open_socket in my older version but you have
a close outside.

        $result = connect(SOCK, $paddr);
        close(SOCK) || die "close: $!" if ($result);
        return $result;
}


On Tue, 2005-09-20 at 17:27, Lloyd Brown wrote:
> I'm actually pulling from CVS.  I just re-retrieved it a few minutes 
> ago, and it still doesn't have the change.  It claims to be working 
> revision 1.120, if that helps.  To quote the same block of code you did, 
> from the ld_open socket to the cancel alarm, I have this:
> 
>         my $sock = &ld_open_socket($$r{server}, $port, $$v{protocol});
>         if ($sock) {
>             close($sock);
>         }
>         &ld_debug(3, "Connected to $1 (port $port)");
>         alarm 0; # Cancel the alarm
> 
> Did your version come from a distribution?  Often times distro packages 
> patch things without publicizing that fact.  I kinda like your code, 
> though.  It looks a little better.  I hope you don't mind if I use it.
> 
> Thanks,
> Lloyd
> 
> Graham David Purcocks M.A.(Oxon.) wrote:
> 
> >What version of ldirectord are you using. My version 1.77.2.11 already
> >has the correct code in check_connect.
> >
> >                my $result = &ld_open_socket($$r{server}, $port,
> >$$v{protocol});
> >                if ($result == 0) {
> >                        # Failure to open the socket
> >                        alarm(0);
> >                        die("Couldn't open socket to
> >$$r{server}:$port");
> >                } else {
> >                        &ld_debug(3, "Connected to $1 (port $port)");
> >                }
> >                alarm 0; # Cancel the alarm
> >
> >Graham
> >
> >
> >  
> >
> 
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
-- 

<Prev in Thread] Current Thread [Next in Thread>