mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 16:13:18 +01:00
Fix IPv6 address validation error
This commit is contained in:
parent
46896e7dce
commit
86df82a29a
@ -100,7 +100,7 @@ sub generate_script_1() {
|
||||
EOF
|
||||
|
||||
copy1 $lib;
|
||||
emit "/n";
|
||||
emit "\n";
|
||||
}
|
||||
|
||||
emit <<'EOF';
|
||||
|
@ -476,6 +476,7 @@ sub valid_6address( $ ) {
|
||||
return 0 unless valid_4address pop @address;
|
||||
$max = 6;
|
||||
$address = join ':', @address;
|
||||
return 1 if @address eq ':';
|
||||
} else {
|
||||
$max = 8;
|
||||
}
|
||||
|
@ -143,10 +143,12 @@ sub setup_route_marking() {
|
||||
sub copy_table( $$$ ) {
|
||||
my ( $duplicate, $number, $realm ) = @_;
|
||||
|
||||
my $filter = $family == F_IPV6 ? q(sed 's/ via :: / /' | ) : '';
|
||||
|
||||
if ( $realm ) {
|
||||
emit ( "\$IP -$family route show table $duplicate | sed -r 's/ realm [[:alnum:]_]+//' | while read net route; do" )
|
||||
} 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',
|
||||
@ -162,11 +164,13 @@ sub copy_table( $$$ ) {
|
||||
|
||||
sub copy_and_edit_table( $$$$ ) {
|
||||
my ( $duplicate, $number, $copy, $realm) = @_;
|
||||
|
||||
my $filter = $family == F_IPV6 ? q(sed 's/ via :: / /' | ) : '';
|
||||
|
||||
if ( $realm ) {
|
||||
emit ( "\$IP -$family route show table $duplicate | sed -r 's/ realm [[:alnum:]_]+//' | while read net route; do" )
|
||||
} 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',
|
||||
|
@ -20,6 +20,8 @@ Changes in Shorewall 4.4.3
|
||||
|
||||
10) Add TRACK_PROVIDERS option.
|
||||
|
||||
11) Fix IPv6 address parsing bug.
|
||||
|
||||
Changes in Shorewall 4.4.2
|
||||
|
||||
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
|
||||
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
|
||||
----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user