Current time: 11-25-2024, 06:46 PM Hello There, Guest! (LoginRegister)


Post Reply 
[Fixed] Traffic accounting issues
Author Message
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: Traffic accounting issues
Ok, I was about to merge this patch when I realized this (and its analogous that I'm not pasting):
Code:
-                       $port = $1 if ($line =~ /dpt\:(\d+) *$/);
+                       $port = $1 if ($line =~ /[dpt,spt]\:(\d+) *$/);

Now, the regular expression that you use seems to be incorrect, because [dpt,spt] means "any of the characters inside brackets, this is, either d or p or t or s or comma", whereas you probably wanted to use (dpt|spt), that means either "dpt" or "spt". Your tests went right because, as you're not matching from the beggining of the line, any "t:xx " (xx being a number) matches your regex Wink

Am I right?
(This post was last modified: 12-11-2009 05:17 AM by kilburn.)
12-11-2009 05:16 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Traffic accounting issues - kilburn - 12-10-2009, 04:33 AM
RE: Traffic accounting issues - aseques - 12-10-2009, 07:17 AM
RE: Traffic accounting issues - kilburn - 12-11-2009 05:16 AM
RE: Traffic accounting issues - aseques - 12-11-2009, 08:36 PM
RE: Traffic accounting issues - marchaos - 01-17-2010, 10:20 AM
RE: Traffic accounting issues - aseques - 01-26-2010, 08:09 PM
RE: Traffic accounting issues - aseques - 02-04-2010, 06:47 PM
RE: Traffic accounting issues - aseques - 02-09-2010, 12:38 AM
RE: Traffic accounting issues - aseques - 02-19-2010, 11:39 PM
RE: Traffic accounting issues - RatS - 03-14-2010, 08:08 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)