f-57: dhcp: écoute sur le macvlan de la gateway anycast, dnsmasq et serveur intégré #57

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-10-13 14:51:40 +02:00
commit 12d69798fb
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
9 changed files with 116 additions and 4 deletions

View file

@ -28,7 +28,7 @@ func (Dnsmasq) Unit(s Subnet) string {
}
func (b Dnsmasq) config(s Subnet) dhcp.Config {
return dhcp.Config{
c := dhcp.Config{
Network: s.Network,
Name: s.Instance(),
ConfDir: b.confDir(),
@ -36,6 +36,11 @@ func (b Dnsmasq) config(s Subnet) dhcp.Config {
VPCRoute: s.VPCRoute,
DefaultGateway: s.DefaultGateway,
}
if s.Listen != "" && s.Listen != s.Bridge {
c.Listen = s.Listen
c.Except = s.Bridge
}
return c
}
func (b Dnsmasq) ConfigureSubnet(s Subnet) error {