[PR #141] [MERGED] fix(net): gratuitous ARP on start so LAN peers relearn the CT MAC #141

Closed
opened 2026-10-15 12:52:18 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/LXC2Docker/pull/141
Author: @JBailes
Created: 7/5/2026
Status: ✅ Merged
Merged: 7/5/2026
Merged by: @JBailes

Base: main ← Head: fix/gratuitous-arp-on-start


📝 Commits (1)

  • d7c8a85 fix(net): gratuitous ARP on start so LAN peers relearn the CT MAC

📊 Changes

2 files changed (+69 additions, -1 deletions)

View changed files

📝 Makefile (+1 -1)
📝 internal/lxc/manager.go (+68 -0)

📄 Description

Follow-up to #140 (stable LAN MAC). Stable MAC stops recreates from changing the MAC, but the MAC still changes the first time that fix lands (or if the derived key ever changes). Until peers relearn it, a recreate leaves the switch/clients/gateway holding stale ARP for the reused static IP — Moonlight can't reach Wolf until the entry ages out (minutes).

Fix: on PVE container start, if it's a LAN-attached CT (gow.lan / gow.lan.ip), send a gratuitous ARP for eth0's IPv4 from inside the CT netns (source MAC = the CT's veth MAC) so peers refresh immediately. Best-effort, async, polls for the netns PID like maybeLeaseLANDHCP. Adds iputils-arping to the package Recommends.

Live-verified on pve .253: after the MAC transitioned to the stable value, Moonlight lost the host; a manual arping -U from the Wolf CT's eth0 immediately restored discovery/connectivity to 192.168.1.50. This automates that.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/LXC2Docker/pull/141 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 7/5/2026 **Status:** ✅ Merged **Merged:** 7/5/2026 **Merged by:** [@JBailes](https://github.com/JBailes) **Base:** `main` ← **Head:** `fix/gratuitous-arp-on-start` --- ### 📝 Commits (1) - [`d7c8a85`](https://github.com/games-on-whales/LXC2Docker/commit/d7c8a851c33e14c81071158f66075645b094f251) fix(net): gratuitous ARP on start so LAN peers relearn the CT MAC ### 📊 Changes **2 files changed** (+69 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `Makefile` (+1 -1) 📝 `internal/lxc/manager.go` (+68 -0) </details> ### 📄 Description Follow-up to #140 (stable LAN MAC). Stable MAC stops recreates from *changing* the MAC, but the MAC still changes the first time that fix lands (or if the derived key ever changes). Until peers relearn it, a recreate leaves the switch/clients/gateway holding **stale ARP** for the reused static IP — Moonlight can't reach Wolf until the entry ages out (minutes). **Fix:** on PVE container start, if it's a LAN-attached CT (`gow.lan` / `gow.lan.ip`), send a **gratuitous ARP** for `eth0`'s IPv4 from inside the CT netns (source MAC = the CT's veth MAC) so peers refresh immediately. Best-effort, async, polls for the netns PID like `maybeLeaseLANDHCP`. Adds `iputils-arping` to the package Recommends. **Live-verified on pve .253:** after the MAC transitioned to the stable value, Moonlight lost the host; a manual `arping -U` from the Wolf CT's `eth0` immediately restored discovery/connectivity to `192.168.1.50`. This automates that. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 12:52:18 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/LXC2Docker#141
No description provided.