Skip Menu |

This queue is for tickets about the IPTables-Parse CPAN distribution.

Report information
The Basics
Id: 107509
Status: resolved
Priority: 0/
Queue: IPTables-Parse

People
Owner: michael.rash [...] gmail.com
Requestors: Michael.Brussk [...] itelligence.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.5
Fixed in: 1.6



Subject: BUG-Report: IPTables::Parse - handle packet- and bytes-counters with "rounded number in K's or M's or G's"
Date: Fri, 2 Oct 2015 17:42:53 +0200
To: bug-IPTables-Parse [...] rt.cpan.org
From: Michael.Brussk [...] itelligence.de
Hello, when the counters are rounded by iptables, the affected rules are empty while calling the function "$ipt_obj->chain_rules('filter', $chain)". The problem is located in your reg-ex which should extract the counters from the rules. As short workaround, i´ve extended/changed the reg-ex in "sub chain_rules()" like follows: 411c411 < if ($line =~ /^\s*(\d+)\s+(\d+)\s+(\d+)\s+(.*)/) { --- Show quoted text
> if ($line =~ /^\s*(\d+)\s+(\d+\w*)\s+(\d+\w*)\s+(.*)/) {
418c418 < if ($line =~ /^\s*(\d+)\s+(\d+)\s+(.*)/) { --- Show quoted text
> if ($line =~ /^\s*(\d+\w*)\s+(\d+\w*)\s+(.*)/) {
Mit freundlichen Grüßen / Kind regards Michael Brußk Administration - Network Services itelligence Outsourcing & Services GmbH ▪ Wilthener Straße 32 ▪ 02625 Bautzen phone: +49 3591 215-555 ▪ fax: +49 3591 215-311 e-mail: michael.brussk@itelligence.de www.itelligencegroup.com itelligence Outsourcing & Services GmbH ▪ Sitz: Bautzen ▪ Handelsregister: Amtsgericht Dresden, HRB 21356 Geschäftsführung: Lars Janitz, Mirko Kruse, Norbert Rotter
Download (untitled)
image/jpeg 7.1k
(untitled)
On Fri Oct 02 11:43:22 2015, Michael.Brussk@itelligence.de wrote: Show quoted text
> Hello, > > when the counters are rounded by iptables, the affected rules are empty > while calling the function "$ipt_obj->chain_rules('filter', $chain)". > The problem is located in your reg-ex which should extract the counters > from the rules.
Hello Michael, I just notice your bug report, and it turns out that the same problem was reported independently by someone else. I've uploaded IPTables::Parse 1.6 to CPAN (may take some time to become visible), and it should fix the issue. Please let me know if there are any problems. Thanks, --Mike Show quoted text
> As short workaround, i´ve extended/changed the reg-ex in "sub > chain_rules()" like follows: > > 411c411 > < if ($line =~ /^\s*(\d+)\s+(\d+)\s+(\d+)\s+(.*)/) { > ---
> > if ($line =~ /^\s*(\d+)\s+(\d+\w*)\s+(\d+\w*)\s+(.*)/) {
> 418c418 > < if ($line =~ /^\s*(\d+)\s+(\d+)\s+(.*)/) { > ---
> > if ($line =~ /^\s*(\d+\w*)\s+(\d+\w*)\s+(.*)/) {
> > > > Mit freundlichen Grüßen / Kind regards > Michael Brußk > Administration - Network Services > > > itelligence Outsourcing & Services GmbH ▪ Wilthener Straße 32 ▪ 02625 > Bautzen > phone: +49 3591 215-555 ▪ fax: +49 3591 215-311 > e-mail: michael.brussk@itelligence.de > > www.itelligencegroup.com > > itelligence Outsourcing & Services GmbH ▪ Sitz: Bautzen ▪ > Handelsregister: Amtsgericht Dresden, HRB 21356 > Geschäftsführung: Lars Janitz, Mirko Kruse, Norbert Rotter
-- -- Michael Rash | Founder http://www.cipherdyne.org/ Key fingerprint: E2EF 0C8A 5AA9 654C 4763 B50F 37AC E946 7F51 8271