Compare commits

...

2 Commits
3.95 ... master

Author SHA1 Message Date
Oliver Gorwits
5af11cb612 #506 fix uninitialised error for hash keys 2023-11-04 11:55:40 +00:00
Oliver Gorwits
aa17e6865c #505 fix uninitialised error for hash keys 2023-11-04 11:50:16 +00:00
3 changed files with 8 additions and 0 deletions

View File

@@ -63,6 +63,8 @@ sub agg_ports_ifstack {
foreach my $idx ( keys %$ifStack ) {
my ( $higher, $lower ) = split /\./, $idx;
next if ( $higher == 0 or $lower == 0 );
next unless exists $ifType->{ $higher } and defined $ifType->{ $higher };
if ( $ifType->{ $higher } eq 'ieee8023adLag'
or $ifType->{ $higher } eq 'propMultiplexor' ) {
$ret->{ $lower } = $higher;

View File

@@ -153,6 +153,8 @@ sub agg_ports_propvirtual {
foreach my $idx ( keys %$ifStack ) {
my ( $higher, $lower ) = split /\./, $idx;
next if ( $higher == 0 or $lower == 0 );
next unless exists $ifType->{ $higher } and defined $ifType->{ $higher };
if ( $ifType->{ $higher } eq 'propVirtual' ) {
# lower needs also to be configured in pagpEthcOperationMode

View File

@@ -873,8 +873,12 @@ sub agg_ports {
my $ret = {};
foreach my $m (keys %$trunks) {
next unless $m and exists $ports->{$m} and defined $ports->{$m};
my $skip = 0;
while (my $s = unpack("x${skip}n2", $trunks->{$m})) {
next unless $s and exists $ports->{$s} and defined $ports->{$s};
$ret->{ $ports->{$s} } = $ports->{$m};
$skip += 2;
}