feat: add VRRP unicast peer support for macvlan and restricted network environments
Release / Build darwin-amd64 (push) Has been cancelled
Release / Build linux-amd64 (push) Has been cancelled
Release / Build darwin-arm64 (push) Has been cancelled
Release / Build linux-arm64 (push) Has been cancelled
Release / Create Release (push) Has been cancelled

- Add unicast_src_ip and unicast_peers config fields
- NewUnicastSocket binds to source IP for proper packet reception
- SendTo() sends VRRP advertisements directly to peer IPs
- Receive loop filters packets from non-peer sources in unicast mode
- Backward compatible: multicast mode used when unicast_peers is empty
- Add unicast config example (etc/config.unicast.yaml)
- Update README with unicast documentation and examples
This commit is contained in:
loveuer
2026-06-07 13:11:34 +08:00
parent 3fc3c860bc
commit 00eba85e39
7 changed files with 281 additions and 32 deletions
+2
View File
@@ -36,6 +36,8 @@ func (m *Manager) LoadFromConfig(cfg *config.Config) error {
vrrpCfg.AuthType,
vrrpCfg.AuthPass,
vrrpCfg.TrackScripts,
vrrpCfg.UnicastSrcIP,
vrrpCfg.UnicastPeers,
m.log,
)
if err != nil {