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
8ee71a18
Commit
8ee71a18
authored
Oct 30, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow to add ipv6 address to OpenVZ containers
parent
45c7d959
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
4 deletions
+34
-4
OpenVZ.pm
PVE/OpenVZ.pm
+2
-2
changelog.Debian
debian/changelog.Debian
+2
-0
Utils.js
www/manager/Utils.js
+29
-1
Network.js
www/manager/openvz/Network.js
+1
-1
No files found.
PVE/OpenVZ.pm
View file @
8ee71a18
...
...
@@ -6,7 +6,7 @@ use File::stat qw();
use
POSIX
qw (LONG_MAX);
use
IO::
Dir
;
use
IO::
File
;
use
PVE::
Tools
qw(extract_param)
;
use
PVE::
Tools
qw(extract_param
$IPV6RE $IPV4RE
)
;
use
PVE::
ProcFSTools
;
use
PVE::
Cluster
qw(cfs_register_file cfs_read_file)
;
use
PVE::
SafeSyslog
;
...
...
@@ -1064,7 +1064,7 @@ sub update_ovz_config {
}
my
$newhash
=
{};
foreach
my
$ip
(
PVE::Tools::
split_list
(
$param
->
{'
ip_address
'}))
{
next
if
$ip
!~
m
|^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(/\d+)?$|
;
next
if
$ip
!~
m
!^(?:$IPV6RE|$IPV4RE)(?:/\d+)?$!
;
$newhash
->
{
$ip
}
=
1
;
if
(
!
$iphash
->
{
$ip
})
{
push
@$changes
,
'
--ipadd
',
$ip
;
...
...
debian/changelog.Debian
View file @
8ee71a18
...
...
@@ -3,6 +3,8 @@ pve-manager (3.1-23) unstable; urgency=low
* subscription updates: set UserAgent header on proxy connect request
* correctly set content type for GUI index page
* allow to add ipv6 address to OpenVZ containers
-- Proxmox Support Team <support@proxmox.com> Tue, 29 Oct 2013 10:20:02 +0100
...
...
www/manager/Utils.js
View file @
8ee71a18
...
...
@@ -25,14 +25,42 @@ Ext.Ajax.on('beforerequest', function(conn, options) {
}
});
var
IPV4_OCTET
=
"
(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])
"
;
var
IPV4_REGEXP
=
"
(?:(?:
"
+
IPV4_OCTET
+
"
\\
.){3}
"
+
IPV4_OCTET
+
"
)
"
;
var
IPV6_H16
=
"
(?:[0-9a-fA-F]{1,4})
"
;
var
IPV6_LS32
=
"
(?:(?:
"
+
IPV6_H16
+
"
:
"
+
IPV6_H16
+
"
)|
"
+
IPV4_REGEXP
+
"
)
"
;
var
IP4_match
=
new
RegExp
(
"
^(
"
+
IPV4_REGEXP
+
"
)$
"
);
var
IPV6_REGEXP
=
"
(?:
"
+
"
(?:(?:
"
+
"
(?:
"
+
IPV6_H16
+
"
:){6})
"
+
IPV6_LS32
+
"
)|
"
+
"
(?:(?:
"
+
"
::
"
+
"
(?:
"
+
IPV6_H16
+
"
:){5})
"
+
IPV6_LS32
+
"
)|
"
+
"
(?:(?:(?:
"
+
IPV6_H16
+
"
)?::
"
+
"
(?:
"
+
IPV6_H16
+
"
:){4})
"
+
IPV6_LS32
+
"
)|
"
+
"
(?:(?:(?:(?:
"
+
IPV6_H16
+
"
:){0,1}
"
+
IPV6_H16
+
"
)?::
"
+
"
(?:
"
+
IPV6_H16
+
"
:){3})
"
+
IPV6_LS32
+
"
)|
"
+
"
(?:(?:(?:(?:
"
+
IPV6_H16
+
"
:){0,2}
"
+
IPV6_H16
+
"
)?::
"
+
"
(?:
"
+
IPV6_H16
+
"
:){2})
"
+
IPV6_LS32
+
"
)|
"
+
"
(?:(?:(?:(?:
"
+
IPV6_H16
+
"
:){0,3}
"
+
IPV6_H16
+
"
)?::
"
+
"
(?:
"
+
IPV6_H16
+
"
:){1})
"
+
IPV6_LS32
+
"
)|
"
+
"
(?:(?:(?:(?:
"
+
IPV6_H16
+
"
:){0,4}
"
+
IPV6_H16
+
"
)?::
"
+
"
)
"
+
IPV6_LS32
+
"
)|
"
+
"
(?:(?:(?:(?:
"
+
IPV6_H16
+
"
:){0,5}
"
+
IPV6_H16
+
"
)?::
"
+
"
)
"
+
IPV6_H16
+
"
)|
"
+
"
(?:(?:(?:(?:
"
+
IPV6_H16
+
"
:){0,7}
"
+
IPV6_H16
+
"
)?::
"
+
"
)
"
+
"
)
"
+
"
)
"
;
var
IP64_match
=
new
RegExp
(
"
^(?:
"
+
IPV6_REGEXP
+
"
)$
"
);
// custom Vtypes
Ext
.
apply
(
Ext
.
form
.
field
.
VTypes
,
{
IPAddress
:
function
(
v
)
{
return
(
/^
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
$/
)
.
test
(
v
);
return
IP64_match
.
test
(
v
);
},
IPAddressText
:
gettext
(
'
Example
'
)
+
'
: 192.168.1.1
'
,
IPAddressMask
:
/
[\d\.]
/i
,
IP64Address
:
function
(
v
)
{
return
IP64_match
.
test
(
v
);
},
IP64AddressText
:
gettext
(
'
Example
'
)
+
'
: 192.168.1.1 2001:DB8::42
'
,
IP64AddressMask
:
/
[
A-Fa-f0-9
\.
:
]
/
,
MacAddress
:
function
(
v
)
{
return
(
/^
([
a-fA-F0-9
]{2}
:
){5}[
a-fA-F0-9
]{2}
$/
).
test
(
v
);
},
...
...
www/manager/openvz/Network.js
View file @
8ee71a18
...
...
@@ -140,7 +140,7 @@ Ext.define('PVE.OpenVZ.IPAdd', {
xtype
:
'
textfield
'
,
name
:
'
ipaddress
'
,
fieldLabel
:
gettext
(
'
IP address
'
),
vtype
:
'
IPAddress
'
,
vtype
:
'
IP
64
Address
'
,
allowBlank
:
false
}
});
...
...
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