Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
043b8c33
Commit
043b8c33
authored
Jun 25, 2015
by
Wolfgang Bumiller
Committed by
Dietmar Maurer
Jun 26, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PVE::API2::Ceph: network_interfaces update + ipv6
parent
f01ad0c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
Ceph.pm
PVE/API2/Ceph.pm
+8
-6
No files found.
PVE/API2/Ceph.pm
View file @
043b8c33
...
...
@@ -765,16 +765,18 @@ __PACKAGE__->register_method ({
my
$find_node_ip
=
sub
{
my
(
$cidr
)
=
@_
;
my
$config
=
PVE::INotify::
read_file
('
interfaces
');
my
$net
=
Net::
IP
->
new
(
$cidr
)
||
die
Net::IP::
Error
()
.
"
\n
";
my
$id
=
$net
->
version
==
6
?
'
address6
'
:
'
address
';
my
$config
=
PVE::INotify::
read_file
('
interfaces
');
my
$ifaces
=
$config
->
{
ifaces
};
foreach
my
$iface
(
keys
%
$
config
)
{
foreach
my
$iface
(
keys
%
$
ifaces
)
{
my
$d
=
$config
->
{
$iface
};
next
if
!
$d
->
{
address
};
my
$a
=
Net::
IP
->
new
(
$d
->
{
address
});
next
if
!
$d
->
{
$id
};
my
$a
=
Net::
IP
->
new
(
$d
->
{
$id
});
next
if
!
$a
;
return
$d
->
{
address
}
if
$net
->
overlaps
(
$a
);
return
$d
->
{
$id
}
if
$net
->
overlaps
(
$a
);
}
die
"
unable to find local address within network '
$cidr
'
\n
";
...
...
Write
Preview
Markdown
is supported
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