forked from extern/shorewall_code
Fix IPv6 address validation error
This commit is contained in:
parent
46896e7dce
commit
86df82a29a
@ -100,7 +100,7 @@ sub generate_script_1() {
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
copy1 $lib;
|
copy1 $lib;
|
||||||
emit "/n";
|
emit "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
emit <<'EOF';
|
emit <<'EOF';
|
||||||
|
@ -476,6 +476,7 @@ sub valid_6address( $ ) {
|
|||||||
return 0 unless valid_4address pop @address;
|
return 0 unless valid_4address pop @address;
|
||||||
$max = 6;
|
$max = 6;
|
||||||
$address = join ':', @address;
|
$address = join ':', @address;
|
||||||
|
return 1 if @address eq ':';
|
||||||
} else {
|
} else {
|
||||||
$max = 8;
|
$max = 8;
|
||||||
}
|
}
|
||||||
|
@ -143,10 +143,12 @@ sub setup_route_marking() {
|
|||||||
sub copy_table( $$$ ) {
|
sub copy_table( $$$ ) {
|
||||||
my ( $duplicate, $number, $realm ) = @_;
|
my ( $duplicate, $number, $realm ) = @_;
|
||||||
|
|
||||||
|
my $filter = $family == F_IPV6 ? q(sed 's/ via :: / /' | ) : '';
|
||||||
|
|
||||||
if ( $realm ) {
|
if ( $realm ) {
|
||||||
emit ( "\$IP -$family route show table $duplicate | sed -r 's/ realm [[:alnum:]_]+//' | while read net route; do" )
|
emit ( "\$IP -$family route show table $duplicate | sed -r 's/ realm [[:alnum:]_]+//' | while read net route; do" )
|
||||||
} else {
|
} else {
|
||||||
emit ( "\$IP -$family route show table $duplicate | while read net route; do" )
|
emit ( "\$IP -$family route show table $duplicate | ${filter}while read net route; do" )
|
||||||
}
|
}
|
||||||
|
|
||||||
emit ( ' case $net in',
|
emit ( ' case $net in',
|
||||||
@ -163,10 +165,12 @@ sub copy_table( $$$ ) {
|
|||||||
sub copy_and_edit_table( $$$$ ) {
|
sub copy_and_edit_table( $$$$ ) {
|
||||||
my ( $duplicate, $number, $copy, $realm) = @_;
|
my ( $duplicate, $number, $copy, $realm) = @_;
|
||||||
|
|
||||||
|
my $filter = $family == F_IPV6 ? q(sed 's/ via :: / /' | ) : '';
|
||||||
|
|
||||||
if ( $realm ) {
|
if ( $realm ) {
|
||||||
emit ( "\$IP -$family route show table $duplicate | sed -r 's/ realm [[:alnum:]_]+//' | while read net route; do" )
|
emit ( "\$IP -$family route show table $duplicate | sed -r 's/ realm [[:alnum:]_]+//' | while read net route; do" )
|
||||||
} else {
|
} else {
|
||||||
emit ( "\$IP -$family route show table $duplicate | while read net route; do" )
|
emit ( "\$IP -$family route show table $duplicate | ${filter}while read net route; do" )
|
||||||
}
|
}
|
||||||
|
|
||||||
emit ( ' case $net in',
|
emit ( ' case $net in',
|
||||||
|
@ -20,6 +20,8 @@ Changes in Shorewall 4.4.3
|
|||||||
|
|
||||||
10) Add TRACK_PROVIDERS option.
|
10) Add TRACK_PROVIDERS option.
|
||||||
|
|
||||||
|
11) Fix IPv6 address parsing bug.
|
||||||
|
|
||||||
Changes in Shorewall 4.4.2
|
Changes in Shorewall 4.4.2
|
||||||
|
|
||||||
1) BUGFIX: Correct detection of Persistent SNAT support
|
1) BUGFIX: Correct detection of Persistent SNAT support
|
||||||
|
@ -194,6 +194,9 @@ Shorewall 4.4.3
|
|||||||
interface (name ends with +) in /etc/shorewall/interfaces did
|
interface (name ends with +) in /etc/shorewall/interfaces did
|
||||||
not work correctly in all cases.
|
not work correctly in all cases.
|
||||||
|
|
||||||
|
5) IPv4 addresses embedded in IPv6 (e.g., ::192.168.1.5) were
|
||||||
|
incorrectly reported as invalid.
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
K N O W N P R O B L E M S R E M A I N I N G
|
K N O W N P R O B L E M S R E M A I N I N G
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user