From 4dea31c8931ad5eccf9c0d0d10cb6b19b392e66d Mon Sep 17 00:00:00 2001 From: openeuler-basic Date: Fri, 13 Mar 2020 15:39:56 +0800 Subject: [PATCH] fix two vf visual machines have the same mac address --- ...rtual-machines-have-same-mac-address.patch | 48 +++++++++++++++++++ systemd.spec | 9 +++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 fix-two-VF-virtual-machines-have-same-mac-address.patch diff --git a/fix-two-VF-virtual-machines-have-same-mac-address.patch b/fix-two-VF-virtual-machines-have-same-mac-address.patch new file mode 100644 index 0000000..7c5adce --- /dev/null +++ b/fix-two-VF-virtual-machines-have-same-mac-address.patch @@ -0,0 +1,48 @@ +From 48b21956443a03ac94f29480e213b05b86fcf525 Mon Sep 17 00:00:00 2001 +From: fangxiuning +Date: Thu, 5 Sep 2019 07:40:41 +0800 +Subject: fix two vf virtual machine has same mac address +through 82599,hns3 physical network cart vf two virtual machine, +two virtual machine have the same mac address. + +MACAddressPolicy= +The policy by which the MAC address should be set. The available +policies are: + +persistent +If the hardware has a persistent MAC address, as most hardware should, +and if it is used by the kernel, nothing is done. Otherwise, a new MAC +address is generated which is guaranteed to be the same on every boot +for the given machine and the given device, but which is otherwise random. +This feature depends on ID_NET_NAME_* properties to exist for the link. +On hardware where these properties are not set, the generation of a +persistent MAC address will fail. + + +random +If the kernel is using a random MAC address, nothing is done. Otherwise, +a new address is randomly generated each time the device appears, +typically at boot. Either way, the random address will have the "unicast" +and "locally administered" bits set. + +none +Keeps the MAC address assigned by the kernel. + + +--- + network/99-default.link | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/network/99-default.link b/network/99-default.link +index 347d4b7..54f1f58 100644 +--- a/network/99-default.link ++++ b/network/99-default.link +@@ -12,4 +12,4 @@ OriginalName=* + + [Link] + NamePolicy=keep kernel database onboard slot path +-MACAddressPolicy=persistent ++MACAddressPolicy=none +-- +1.8.3.1 + diff --git a/systemd.spec b/systemd.spec index 45ce7a0..18efd81 100644 --- a/systemd.spec +++ b/systemd.spec @@ -16,7 +16,7 @@ Name: systemd Url: https://www.freedesktop.org/wiki/Software/systemd Version: 243 -Release: 17 +Release: 18 License: MIT and LGPLv2+ and GPLv2+ Summary: System and Service Manager @@ -60,6 +60,7 @@ Patch0013: CVE-2020-1712-3.patch Patch0014: CVE-2020-1712-4.patch Patch0015: sd-journal-close-journal-files-that-were-deleted-by-.patch Patch0016: pid1-bump-DefaultTasksMax-to-80-of-the-kernel-pid.ma.patch +Patch0017: fix-two-VF-virtual-machines-have-same-mac-address.patch #openEuler Patch9002: 1509-fix-journal-file-descriptors-leak-problems.patch @@ -1463,6 +1464,12 @@ fi %exclude /usr/share/man/man3/* %changelog +* Fri Mar 13 2020 openEuler Buildteam - 243-18 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:fix two vf visual machines have the same mac address + * Tue Mar 10 2020 openEuler Buildteam - 243-17 - Type:enhancement - ID:NA -- Gitee