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
7946f1f1
Commit
7946f1f1
authored
Mar 05, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network config: allow empty IP address/netmask
bump version to 2.3-13
parent
ad9c5c05
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
Network.pm
PVE/API2/Network.pm
+9
-6
changelog.Debian
debian/changelog.Debian
+6
-0
defines.mk
defines.mk
+1
-1
No files found.
PVE/API2/Network.pm
View file @
7946f1f1
...
...
@@ -58,6 +58,7 @@ my $confdesc = {
description
=>
'
Network mask.
',
type
=>
'
string
',
format
=>
'
ipv4mask
',
optional
=>
1
,
requires
=>
'
address
',
},
address
=>
{
description
=>
'
IP address.
',
...
...
@@ -161,14 +162,14 @@ my $check_duplicate_gateway = sub {
};
my
$check_ipv4_settings
=
sub
{
my
$param
=
$_
[
0
]
;
my
(
$address
,
$netmask
)
=
@_
;
my
$binip
=
Net::IP::
ip_iptobin
(
$
param
->
{
address
}
,
4
);
my
$binmask
=
Net::IP::
ip_iptobin
(
$
param
->
{
netmask
}
,
4
);
my
$binip
=
Net::IP::
ip_iptobin
(
$
address
,
4
);
my
$binmask
=
Net::IP::
ip_iptobin
(
$
netmask
,
4
);
my
$broadcast
=
Net::IP::
ip_iptobin
('
255.255.255.255
',
4
);
my
$binhost
=
$binip
|
$binmask
;
raise_param_exc
({
address
=>
"
$
param
->{address}
is not a valid host ip address.
"
})
raise_param_exc
({
address
=>
"
$
address
is not a valid host ip address.
"
})
if
(
$binhost
eq
$binmask
)
||
(
$binhost
eq
$broadcast
);
};
...
...
@@ -204,7 +205,8 @@ __PACKAGE__->register_method({
&
$check_duplicate_gateway
(
$config
,
$iface
)
if
$param
->
{
gateway
};
&
$check_ipv4_settings
(
$param
);
&
$check_ipv4_settings
(
$param
->
{
address
},
$param
->
{
netmask
})
if
$param
->
{
address
};
$param
->
{
method
}
=
$param
->
{
address
}
?
'
static
'
:
'
manual
';
...
...
@@ -261,7 +263,8 @@ __PACKAGE__->register_method({
&
$check_duplicate_gateway
(
$config
,
$iface
)
if
$param
->
{
gateway
};
&
$check_ipv4_settings
(
$param
);
&
$check_ipv4_settings
(
$param
->
{
address
},
$param
->
{
netmask
})
if
$param
->
{
address
};
$param
->
{
method
}
=
$param
->
{
address
}
?
'
static
'
:
'
manual
';
...
...
debian/changelog.Debian
View file @
7946f1f1
pve-manager (2.3-13) unstable; urgency=low
* network config: allow empty IP address/netmask
-- Proxmox Support Team <support@proxmox.com> Tue, 05 Mar 2013 06:47:40 +0100
pve-manager (2.3-12) unstable; urgency=low
* fix IP address verification (Undefined subroutine &Net::IP::ip_to_bin)
...
...
defines.mk
View file @
7946f1f1
...
...
@@ -2,7 +2,7 @@ RELEASE=2.3
VERSION=2.3
PACKAGE=pve-manager
PACKAGERELEASE=1
2
PACKAGERELEASE=1
3
BINDIR=${DESTDIR}/usr/bin
PERLLIBDIR=${DESTDIR}/usr/share/perl5
...
...
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