mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-23 22:58:52 +01:00
Use HEX representation for matching IPv6 addresses in basic filters.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
4daee95902
commit
50fb8e3f2f
@ -333,14 +333,14 @@ sub decompose_net_u32( $ ) {
|
||||
my @result;
|
||||
|
||||
while ( $vlsm >= 32 ) {
|
||||
push @result, 0xffffff;
|
||||
push @result, ( shift( @addr ) << 16 ) | shift( @addr );
|
||||
push @result, in_hex8( 0xffffff );
|
||||
push @result, in_hex8( ( shift( @addr ) << 16 ) | shift( @addr ) );
|
||||
$vlsm -= 32;
|
||||
}
|
||||
|
||||
if ( $vlsm ) {
|
||||
push @result, ( ( 0xffffffff << ( 32 - $vlsm ) ) & 0xffffffff );
|
||||
push @result, ( ( $addr[0] << 16) | $addr[1] );
|
||||
push @result, in_hex8( ( 0xffffffff << ( 32 - $vlsm ) ) & 0xffffffff );
|
||||
push @result, in_hex8( ( $addr[0] << 16) | $addr[1] );
|
||||
}
|
||||
|
||||
@result;
|
||||
|
Loading…
Reference in New Issue
Block a user