fix: Generate local MAC address (#179)

This commit is contained in:
Kroese 2025-02-25 05:50:39 +01:00 committed by GitHub
parent 71810373f9
commit 69ece08bcc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -222,6 +222,8 @@ configureNAT() {
fi fi
GATEWAY_MAC=$(echo "$VM_NET_MAC" | rev) GATEWAY_MAC=$(echo "$VM_NET_MAC" | rev)
GATEWAY_MAC="02:${GATEWAY_MAC:0:14}"
if ! ip link set dev "$VM_NET_TAP" address "$GATEWAY_MAC"; then if ! ip link set dev "$VM_NET_TAP" address "$GATEWAY_MAC"; then
warn "Failed to set gateway MAC address.." warn "Failed to set gateway MAC address.."
fi fi

View file

@ -266,4 +266,5 @@ echo "$user:{PLAIN}${PASS:-}" > /etc/nginx/.htpasswd
cp -r /var/www/* /run/shm cp -r /var/www/* /run/shm
html "Starting $APP for Docker..." html "Starting $APP for Docker..."
nginx -e stderr nginx -e stderr
return 0 return 0