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