Fix route_rules in IPv6

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9109 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2008-12-18 01:28:16 +00:00
parent 7322db665a
commit 515314f60c

View File

@ -431,7 +431,8 @@ sub add_an_rtrule( $$$$ ) {
if ( $source eq '-' ) {
$source = 'from ' . ALLIP;
} elsif ( $source =~ /:/ ) {
} elsif ( $family == F_IPV4 ) {
if ( $source =~ /:/ ) {
( my $interface, $source , my $remainder ) = split( /:/, $source, 3 );
fatal_error "Invalid SOURCE" if defined $remainder;
validate_net ( $source, 0 );
@ -442,6 +443,16 @@ sub add_an_rtrule( $$$$ ) {
} else {
$source = "iif $source";
}
} elsif ( $source =~ /^(.+?):<(.+)>\s*$/ ) {
my ($interface, $source ) = ($1, $2);
validate_net ($source, 0);
$source = "iif $interface from $source";
} elsif ( $source =~ /\..*\..*/ ) {
validate_net ( $source, 0 );
$source = "from $source";
} else {
$source = "iif $source";
}
fatal_error "Invalid priority ($priority)" unless $priority && $priority =~ /^\d{1,5}$/;