Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
f4b8365d
Commit
f4b8365d
authored
Jan 04, 2022
by
Francesc Guasch
Browse files
wip: check ip is nat, not bridged
issue #1672
parent
337979ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/Ravada/Domain/KVM.pm
View file @
f4b8365d
...
...
@@ -1644,7 +1644,7 @@ sub _ip_agent($self) {
$found
=
$addr
->
{
addr
}
if
!
$found
;
return
$addr
->
{
addr
}
if
$self
->
_vm
->
_is_ip_
bridged
(
$addr
->
{
addr
});
if
$self
->
_vm
->
_is_ip_
nat
(
$addr
->
{
addr
});
}
}
return
$found
;
...
...
lib/Ravada/VM/KVM.pm
View file @
f4b8365d
...
...
@@ -2556,7 +2556,7 @@ sub list_machine_types($self) {
return
%ret_types
;
}
sub
_is_ip_
bridged
($self, $ip0) {
sub
_is_ip_
nat
($self, $ip0) {
my
$ip
=
NetAddr::
IP
->
new
(
$ip0
);
for
my
$net
(
$self
->
vm
->
list_networks
)
{
my
$xml
=
XML::
LibXML
->
load_xml
(
string
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment