Skip to content

Commit

Permalink
Do not fail if address already exists
Browse files Browse the repository at this point in the history
This patch fixes network uplink failures on Fedora 37 and Debian 11 VMs
with only one vCPU.  There is an underlying problem that causes the
script to be run more than once, but this patch is a workaround until
that bug can be found and fixed.

Fixes: QubesOS/qubes-issues#8305
Fixes: QubesOS/qubes-issues#8362
  • Loading branch information
DemiMarie committed Jul 15, 2023
1 parent 21518b8 commit 39b456f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions network/setup-ip
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ configure_network () {
local secondary_dns="${10}"
local custom="${11}"

/sbin/ip -- address add "$ip/$netmask" dev "$INTERFACE"
/sbin/ip -- address replace "$ip/$netmask" dev "$INTERFACE"
if [[ "$custom" = false ]]; then
/sbin/ip -- neighbour replace to "$gateway" dev "$INTERFACE" \
lladdr "$netvm_mac" nud permanent
fi
if [ -n "$ip6" ]; then
/sbin/ip -- address add "$ip6/$netmask6" dev "$INTERFACE"
/sbin/ip -- address replace "$ip6/$netmask6" dev "$INTERFACE"
if [[ "$custom" = false ]]; then
/sbin/ip -- neighbour replace to "$gateway6" dev "$INTERFACE" \
lladdr "$netvm_mac" nud permanent
Expand Down

0 comments on commit 39b456f

Please sign in to comment.