pf-tools/pf-tools: FIX: regexp for matching routes

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Mon Aug 19 15:03:34 UTC 2013


details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/b81cc9f37151
changeset: 1198:b81cc9f37151
user:      Richard Phan
date:      Mon Aug 19 17:03:27 2013 +0200
description:
FIX: regexp for matching routes

diffstat:

 lib/PFTools/Utils.pm |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 7867c5920f82 -r b81cc9f37151 lib/PFTools/Utils.pm
--- a/lib/PFTools/Utils.pm	Mon Aug 19 11:04:44 2013 +0200
+++ b/lib/PFTools/Utils.pm	Mon Aug 19 17:03:27 2013 +0200
@@ -1474,7 +1474,7 @@
         # FIXME add test cases in t/* for non-default routes
         my $suffix = get_suffix_from_ip_type($ip_type);
         foreach my $route ( @{ $if_part->{ '@route' . $suffix } } ) {
-            if ( $route =~ m{ \A (\S+) \s* (?: via (?: \S+ ) )? \z }xms ) {
+            if ( $route =~ m{ \A \s* (\S+) \s* (?: via \s* \S+ )? \s* \z }xms ) {
                 my $destination = $1;
                 push @{ $routes->{$destination} }, qq{$iface $route};
             }



More information about the pf-tools-commits mailing list