Skip to content

Commit

Permalink
fix: do not insert network twice
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed Nov 6, 2023
1 parent ed589b9 commit 4ef68a9
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 4ef68a9

Please sign in to comment.