ALT Linux Bugzilla
– Attachment 8908 Details for
Bug 38762
Неверно сохраняется маска подсети из веб-интерфейса PVE
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
pve-common: принимать маску сети из etcnet в любом формате (компактная версия)
file_38762.txt (text/plain), 831 bytes, created by
Andrew Vasilyev
on 2020-08-13 16:46:38 MSK
(
hide
)
Description:
pve-common: принимать маску сети из etcnet в любом формате (компактная версия)
Filename:
MIME Type:
Creator:
Andrew Vasilyev
Created:
2020-08-13 16:46:38 MSK
Size:
831 bytes
patch
obsolete
>diff --git src/PVE/INotifyEtcnetOverride.pm src/PVE/INotifyEtcnetOverride.pm >index 2a61264..f5a8a9b 100644 >--- src/PVE/INotifyEtcnetOverride.pm >+++ src/PVE/INotifyEtcnetOverride.pm >@@ -658,7 +658,7 @@ sub __read_ipv4address_into { > chomp ($line); > if ($line =~ m!^\s*(?:$|#)!) { > # skip >- } elsif ($line =~ s!\s*([\d\.]+)/(\d+)\s*!!) { >+ } elsif ($line =~ s!\s*([\d\.]+)/([\d\.]+)\s*!!) { > $f->{address} = $1; > $f->{netmask} = __unwrap_netmask4($2); > __line_broadcast_into($path, $line, $f, 'broadcast'); >@@ -686,6 +686,7 @@ my %nm4prefix = qw/ > sub __unwrap_netmask4 { > my $in=shift; > my @out; >+ return $in if ($in =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/); > while (@out<4) { > if ($in>8) { > push @out, '255';
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 38762
:
8885
|
8907
| 8908