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:
parent
6c35ebdff4
commit
12d69798fb
9 changed files with 116 additions and 4 deletions
|
|
@ -18,6 +18,12 @@ func GenerateConfig(c Config) (string, map[string]string, error) {
|
|||
|
||||
var sb strings.Builder
|
||||
fmt.Fprintf(&sb, "no-resolv\n")
|
||||
if c.Listen != "" {
|
||||
fmt.Fprintf(&sb, "interface=%s\n", c.Listen)
|
||||
}
|
||||
if c.Except != "" {
|
||||
fmt.Fprintf(&sb, "except-interface=%s\n", c.Except)
|
||||
}
|
||||
fmt.Fprintf(&sb, "dhcp-range=%s,static,%s,12h\n", c.Network.IP.String(), mask)
|
||||
fmt.Fprintf(&sb, "dhcp-option=121,%s\n", strings.Join(classlessRoutes(c), ","))
|
||||
if c.DefaultGateway != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue