diff --git a/Shorewall/Macros/macro.PPtP b/Shorewall/Macros/macro.PPtP index b4ba427e8..c126707b6 100644 --- a/Shorewall/Macros/macro.PPtP +++ b/Shorewall/Macros/macro.PPtP @@ -6,7 +6,7 @@ # This macro handles PPTP traffic. # ############################################################################### -?FORMAT 2 +FORMAT 2 #ACTION SOURCE DEST PROTO DEST SOURCE RATE USER/ # PORT(S) PORT(S) LIMIT GROUP PARAM - - 47 diff --git a/Shorewall/Perl/Shorewall/Tc.pm b/Shorewall/Perl/Shorewall/Tc.pm index f2cc5923b..53877f42f 100644 --- a/Shorewall/Perl/Shorewall/Tc.pm +++ b/Shorewall/Perl/Shorewall/Tc.pm @@ -398,11 +398,11 @@ sub process_tc_rule( ) { } } - $cmd =~ /^TTL\(([-+]?\d+)\)$/; + $cmd =~ /^TTL\(([-+]?(\d+))\)$/; my $param = $1; - fatal_error "Invalid TTL specification( $cmd )" unless $param && ( $param = abs $param ) < 256; + fatal_error "Invalid TTL specification( $cmd )" unless $2 && ( $param = abs $param ) < 256; if ( $1 =~ /^\+/ ) { $target .= " --ttl-inc $param"; @@ -426,11 +426,11 @@ sub process_tc_rule( ) { } } - $cmd =~ /^HL\(([-+]?\d+)\)$/; + $cmd =~ /^HL\(([-+]?(\d+))\)$/; my $param = $1; - fatal_error "Invalid HL specification( $cmd )" unless $param && ( $param = abs $param ) < 256; + fatal_error "Invalid HL specification( $cmd )" unless $2 && ( $param = abs $param ) < 256; if ( $1 =~ /^\+/ ) { $target .= " --hl-inc $param";