diff --git a/Shorewall-perl/Shorewall/Rules.pm b/Shorewall-perl/Shorewall/Rules.pm index 276269b15..a3ea4d7b6 100644 --- a/Shorewall-perl/Shorewall/Rules.pm +++ b/Shorewall-perl/Shorewall/Rules.pm @@ -1841,7 +1841,7 @@ sub generate_matrix() { } for my $typeref ( values %$dest_hosts_ref ) { - for my $interface ( keys %$typeref ) { + for my $interface ( sort { interface_number( $a ) <=> interface_number( $b ) } keys %$typeref ) { my $arrayref = $typeref->{$interface}; for my $hostref ( @$arrayref ) { next if $hostref->{options}{sourceonly};