--On Thursday, March 10, 2005 5:22 PM +0100 Marko Riedel <[EMAIL PROTECTED]> wrote:


Hello there,

I moved the debug statement:

    if ($intended)
    {
       $sref->{"_intended"} = $intended;
    }

    open DEBUG, '>>/tmp/dbg';
    print DEBUG "FROMIP: <$fromip>\n";
    close DEBUG;

    syslog ('info', "trap $trap{typ} $trap{spc} from " .
            "$fromip grp=$trap{grp} svc=$trap{svc}, sta=$trap{sta}\n");

and now I get

FROMIP: <>
FROMIP: <>
FROMIP: <>
FROMIP: <>
FROMIP: <>
FROMIP: <>



Interesting... I wonder what exactly recv is returning and why it's failing in this way. Lets add a bit more debugging. In handle_trap change
my ($port, $addr) = sockaddr_in ($from);
my $fromip = inet_ntoa ($addr);


To:
my ($port, $addr) = sockaddr_in ($from);
my $fromip = inet_ntoa ($addr);

open DEBUG, '>>/tmp/dbg';
print DEBUG "From paddr family: ".sockaddr_family($from)."\n";
print DEBUG "From paddr: ".Data::Dumper->Dump([\$from],['from'])."\n";
print DEBUG "From port: $port\nFrom iaddr: ".Data::Dumper->Dump([\$addr], 'addr'])."\n";
print DEBUG "From IP: $fromip\n";




Run that and grab the output. And then change sockaddr_in to unpack_sockaddr_in and grab that output. Then post both...


-David

David Nolan                    <*>                    [EMAIL PROTECTED]
curses: May you be forced to grep the termcap of an unclean yacc while
     a herd of rogue emacs fsck your troff and vgrind your pathalias!

_______________________________________________
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to