1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-18 14:28:08 +00:00

Merge pull request #1932 from GNS3/mac-address-generation

Change how to generate random MAC addresses
This commit is contained in:
Jeremy Grossmann 2021-07-27 16:51:29 +09:30 committed by GitHub
commit 214bef9d06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -615,7 +615,7 @@ class QemuVM(BaseNode):
if not mac_address: if not mac_address:
# use the node UUID to generate a random MAC address # use the node UUID to generate a random MAC address
self._mac_address = "0c:%s:%s:%s:%s:00" % (self.project.id[-4:-2], self.project.id[-2:], self.id[-4:-2], self.id[-2:]) self._mac_address = "0c:%s:%s:%s:00:00" % (self.id[2:4], self.id[4:6], self.id[6:8])
else: else:
self._mac_address = mac_address self._mac_address = mac_address