mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-06 00:19:06 +08:00
fix: Preserve gateway MAC address (#898)
This commit is contained in:
parent
1c9b793c75
commit
2adf0b292b
@ -213,6 +213,11 @@ configureNAT() {
|
||||
error "$tuntap" && return 1
|
||||
fi
|
||||
|
||||
GATEWAY_MAC=$(echo "$VM_NET_MAC" | rev)
|
||||
if ! ip link set dev "$VM_NET_TAP" address "$GATEWAY_MAC"; then
|
||||
warn "Failed to set gateway MAC address.."
|
||||
fi
|
||||
|
||||
while ! ip link set "$VM_NET_TAP" up promisc on; do
|
||||
info "Waiting for TAP to become available..."
|
||||
sleep 2
|
||||
@ -389,8 +394,8 @@ if [[ "$IP" == "172.17."* ]]; then
|
||||
warn "your container IP starts with 172.17.* which will cause conflicts when you install the Container Manager package inside DSM!"
|
||||
fi
|
||||
|
||||
if [[ -d "/sys/class/net/$VM_NET_TAP" ]]; then
|
||||
info "Lingering interface will be removed..."
|
||||
if [[ -d "/sys/class/net/$VM_NET_TAP" ]]; then
|
||||
info "Lingering interface will be removed..."
|
||||
ip link delete "$VM_NET_TAP" || true
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user