[pve-devel] [PATCH 0/2] Allow four-octet MAC perfixes
Moayad Almalat
m.almalat at proxmox.com
Fri Nov 15 09:49:22 CET 2024
This patch series enables support for four-octet MAC prefixes in Web UI
Changes are made in both forntend `proxmox-widget-toolkit` and backend `pve-cluster`
Thank you @Shannon for your hint in my first attempt :)
Signed-off-by: Moayad Almalat <m.almalat at proxmox.com>
---
src/PVE/DataCenterConfig.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
index abd0bbf..98e5599 100644
--- a/src/PVE/DataCenterConfig.pm
+++ b/src/PVE/DataCenterConfig.pm
@@ -199,7 +199,7 @@ PVE::JSONSchema::register_format('mac-prefix', \&pve_verify_mac_prefix);
sub pve_verify_mac_prefix {
my ($mac_prefix, $noerr) = @_;
- if ($mac_prefix !~ m/^[a-f0-9][02468ace](?::[a-f0-9]{2}){0,2}:?$/i) {
+ if ($mac_prefix !~ m/^[a-f0-9][02468ace](?::[a-f0-9]{2}){0,2}(?::[a-f0-9]{0,2})?:?$/i) {
return undef if $noerr;
die "value is not a valid unicast MAC address prefix\n";
}
--
2.39.5
More information about the pve-devel
mailing list