On Thu, Aug 11, 2011 at 03:13, Michael C. Robinson <[email protected]
> wrote:
> [root@xerxes perlipq-1.25]# cat /proc/net/ip_queue
> Peer PID : 0
>
Notice how PID is capitalized...
> while (<PROC>) {
> if (/^Peer pid\s+:\s+(\d+)/) {
> $procpid = $1;
> last;
> }
> }
>
Notice how pid is not capitalized in the regexp and there is no case
insensitivity flag? Yup.
Perhaps PID used to be lowercase in an older kernel, no idea, but...
$> grep -r 'ip_queue' perlipq-1.25
perlipq-1.25/README: # modprobe ip_queue
perlipq-1.25/README: any locally generated ICMP packets (e.g. ping) to the
ip_queue module for
perlipq-1.25/t/simple.t: $procfile = '/proc/net/ip_queue';
$> grep -r 'pid' perlipq-1.25
perlipq-1.25/t/simple.t: my ($q, $procfile, $procpid);
perlipq-1.25/t/simple.t: if (/^Peer pid\s+:\s+(\d+)/) {
perlipq-1.25/t/simple.t: $procpid = $1;
perlipq-1.25/t/simple.t: if (!$procpid) {
perlipq-1.25/t/simple.t: if ($procpid != $$) {
It appears the test is the only piece of code that is looking at the
/proc/net/ip_queue file or looking for "Peer pid". The real perl code is
using Perl-XS to access libipq and netfilter C libraries directly. Looks
like a bad test. Change the test to what it should be for now. Consider
submitting a patch upstream or notifying the author. Oh hey, what do you
know, someone already created the bug on CPAN...7 years ago:
https://rt.cpan.org/Public/Bug/Display.html?id=7953
Cheers,
Daniel Hedlund
[email protected]
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug