Skip to content

Commit

Permalink
fix: do not insert network twice (#2005)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed Nov 8, 2023
1 parent 4e3011f commit be2ae40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Ravada.pm
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,11 @@ sub _add_internal_network($self) {
." VALUES(?,?,?,1,0)"
);
my $n=0;
my %done;
for my $net (split /\n/,$out) {
next if $net =~ /dev virbr/;
my ($address) = $net =~ m{(^[\d\.]+/\d+)};
next if !$address;
next if !$address || $done{address}++;
$sth->execute("internal$n",$address, ++$n+1);

}
Expand Down

0 comments on commit be2ae40

Please sign in to comment.