]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
global: Switch MAC generation to Zabbly prefix
authorStéphane Graber <stgraber@stgraber.org>
Sun, 16 Mar 2025 06:20:02 +0000 (02:20 -0400)
committerStéphane Graber <stgraber@stgraber.org>
Sun, 16 Mar 2025 06:20:45 +0000 (02:20 -0400)
Zabbly obtained the 10:66:6a MAC address prefix for use by
the Linux Containers project.

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
config/etc/default.conf.lxcbr
config/init/common/lxc-net.in
lxc.spec.in
src/lxc/confile_utils.c
src/tests/get_item.c
src/tests/lxc-test-createconfig

index e53047d8b49a348ed0e2df447ae40174e7f5771a..b513e2ac07ca84c63a24b157f17d2592ddce27c8 100644 (file)
@@ -1,4 +1,4 @@
 lxc.net.0.type = veth
 lxc.net.0.link = lxcbr0
 lxc.net.0.flags = up
-lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
+lxc.net.0.hwaddr = 10:66:6a:xx:xx:xx
index 06b632b1065fe620157d123e39685497d84fbbaf..516f1d83e147da73fe525b008852c1ad5d870235 100755 (executable)
@@ -9,7 +9,7 @@ varlib="@LOCALSTATEDIR@/lib"
 
 USE_LXC_BRIDGE="true"
 LXC_BRIDGE="lxcbr0"
-LXC_BRIDGE_MAC="00:16:3e:00:00:00"
+LXC_BRIDGE_MAC="10:66:6a:00:00:00"
 LXC_ADDR="10.0.3.1"
 LXC_NETMASK="255.255.255.0"
 LXC_NETWORK="10.0.3.0/24"
index 3385df153702800ef14362d55812c27de09c8a3e..e7026ee11347aa534e42442eb97cead7a71c2e94 100644 (file)
@@ -170,7 +170,7 @@ USE_LXC_BRIDGE="true"
 # If you have the dnsmasq daemon installed, you'll also have to update
 # /etc/dnsmasq.d/lxc and restart the system wide dnsmasq daemon.
 LXC_BRIDGE="lxcbr0"
-LXC_BRIDGE_MAC="00:16:3e:00:00:00"
+LXC_BRIDGE_MAC="10:66:6a:00:00:00"
 LXC_ADDR="$SUBNET.1"
 LXC_NETMASK="255.255.255.0"
 LXC_NETWORK="$SUBNET.0/24"
index 24eb46acff23a75dabdeb924465708ffe053a7dc..79833fd2df5767cf7ae7630914e95e04d2da340b 100644 (file)
@@ -775,13 +775,13 @@ bool new_hwaddr(char *hwaddr)
 
        seed = randseed(false);
 
-       ret = strnprintf(hwaddr, 18, "00:16:3e:%02x:%02x:%02x", rand_r(&seed) % 255,
+       ret = strnprintf(hwaddr, 18, "10:66:6a:%02x:%02x:%02x", rand_r(&seed) % 255,
                       rand_r(&seed) % 255, rand_r(&seed) % 255);
 #else
 
        (void)randseed(true);
 
-       ret = strnprintf(hwaddr, 18, "00:16:3e:%02x:%02x:%02x", rand() % 255,
+       ret = strnprintf(hwaddr, 18, "10:66:6a:%02x:%02x:%02x", rand() % 255,
                       rand() % 255, rand() % 255);
 #endif
        if (ret < 0)
index 9e74f8a235ecec8dc519eabb21ee135aee862b8e..40cc564adfb4764b1cc5f971cbda0fe65cafddf4 100644 (file)
@@ -548,7 +548,7 @@ int main(int argc, char *argv[])
                goto out;
        }
 
-       if (!c->set_config_item(c, "lxc.net.0.hwaddr", "00:16:3e:xx:xx:xx")) {
+       if (!c->set_config_item(c, "lxc.net.0.hwaddr", "10:66:6a:xx:xx:xx")) {
                fprintf(stderr, "%d: failed to set network.hwaddr\n", __LINE__);
                goto out;
        }
index dc40c10ad87aa979a7f4991ee79261cab4ce29bb..e6b7e4b481519a2f6a90a4af8d03d2c9e15abb7f 100755 (executable)
@@ -20,7 +20,7 @@ trap cleanup EXIT
 
 cat > $f << EOF
 lxc.net.0.type = veth
-lxc.net.0.hwaddr = 00:16:3e:xx:xx:xx
+lxc.net.0.hwaddr = 10:66:6a:xx:xx:xx
 EOF
 lxc-create -t busybox -f $f -n lxctestc
 grep -q "xx:xx" /var/lib/lxc/lxctestc/config && { echo "hwaddr not expanded"; exit 1; }