Skip Menu |

This queue is for tickets about the Net-Pcap CPAN distribution.

Report information
The Basics
Id: 25076
Status: resolved
Priority: 0/
Queue: Net-Pcap

People
Owner: SAPER [...] cpan.org
Requestors: SAPER [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.15



CC: bug-Net-Pcap [...] rt.cpan.org
Subject: Re: Net::Pcap 0.14
Date: Thu, 22 Feb 2007 02:23:04 +0100
To: Eric Atkin <eric [...] certus.bz>
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Eric Atkin wrote: Show quoted text
> Hey, > I think I found a bug in your Net::Pcap module with regard to the > pcap_next_ex > function. The scalar that I would pass as \$packet would always be > undefined > after next_ex returned. I've included a patch that makes it work > for me. > Please let me know if I've misunderstood something so I can quit > using my > patched version of Net::Pcap.
Hello, I've already been made aware of this problem, see the following ticket: » https://rt.cpan.org/Ticket/Display.html?id=24143 I've tried your patch but it does not resolve the problem on my Linux box, and since I first looked at it, I'm wondering how it could possibly work better than the previous code because newSVpv() is implemented by calling new_SV() and then sv_setpvn(). I'm also surprised that it doesn't crash because you're trying to dereference pkt_data with SvRV() even though it's just a SV, and given that it's uninitialized at this time. Note that I can be totally wrong as my XS knowledge is quite limited. (I'm just the maintainer of Net::Pcap, I didn't wrote most parts of the XS code.) Thanks anyway for your report and for your patch. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
Subject: Re: Net::Pcap 0.14
Date: Thu, 22 Feb 2007 02:41:21 +0100
To: Eric Atkin <eric [...] certus.bz>, bug-Net-Pcap [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <saper [...] cpan.org>
Funny how it's always exactly 3 minutes after sending an email explaining why someone was wrong that you suddenly get hit by the blinding strike of Truth.. Show quoted text
> Eric Atkin wrote: >
>> Hey, >> I think I found a bug in your Net::Pcap module with regard to the >> pcap_next_ex >> function. The scalar that I would pass as \$packet would always be >> undefined >> after next_ex returned. I've included a patch that makes it work >> for me. >> Please let me know if I've misunderstood something so I can quit >> using my >> patched version of Net::Pcap.
> > I've tried your patch but it does not resolve the problem on my > Linux box, and since I first looked at it, I'm wondering how it > could possibly work better than the previous code because newSVpv() > is implemented by calling new_SV() and then sv_setpvn(). I'm also > surprised that it doesn't crash because you're trying to > dereference pkt_data with SvRV() even though it's just a SV, and > given that it's uninitialized at this time.
I made an error while first testing your patch (forgot to use -Mblib..). Retried now and of course of works. Please disregard my comment about why your patch shouldn't have worked, it only demonstrates that 1) I am not using Net::Pcap, 2) I shouldn't try to code when it's bed time. Thanks for your patch, it's been applied. -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.