vxlan: the idea was to have pluggable device code :)

While here change the expected device name from "vxlan.X" to "vxlanX",
since "." denotes the newer FreeBSD VLAN ID syntax on top of parent
devices (e.g. "igb0.12") and all devices should follow the regex of
"^[a-z]+[0-9]+".
This commit is contained in:
Franco Fichtner 2019-11-03 12:27:10 +01:00
parent 5db422e0cc
commit 11106c4990
2 changed files with 9 additions and 2 deletions

View File

@ -129,7 +129,6 @@ function core_devices()
$devices[] = array('pattern' => '_stf', 'volatile' => true);
$devices[] = array('pattern' => '_wlan', 'volatile' => true);
$devices[] = array('pattern' => 'vlan', 'volatile' => true);
$devices[] = array('pattern' => 'vxlan', 'volatile' => true);
return $devices;
}

View File

@ -34,6 +34,14 @@
);
}
function vxlan_devices()
{
$devices = array();
$devices[] = array('pattern' => '^vxlan', 'volatile' => true, 'configurable' => false);
return $devices;
}
function vxlan_configure_interface($verbose=false)
{
@ -64,7 +72,7 @@ function vxlan_configure_interface($verbose=false)
// skip when interface address is not assigned (yet)
continue;
}
$device_name = "vxlan.{$vxlan->deviceId}" ;
$device_name = "vxlan{$vxlan->deviceId}";
$configured_devices[] = $device_name;
$current_settings = array(
"vxlanid" => null,