f-28: fix: dhcp do not emit local default route
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
32b78a84f9
commit
2504b435a3
4 changed files with 29 additions and 13 deletions
|
|
@ -14,7 +14,9 @@ func GenerateConfig(c Config) (string, map[string]string, error) {
|
|||
var sb strings.Builder
|
||||
fmt.Fprintf(&sb, "no-resolv\n")
|
||||
fmt.Fprintf(&sb, "dhcp-range=%s,static,%s,12h\n", c.Network.IP.String(), mask)
|
||||
fmt.Fprintf(&sb, "dhcp-option=3,%s\n", c.Gateway.String())
|
||||
if c.DefaultRoute {
|
||||
fmt.Fprintf(&sb, "dhcp-option=3,%s\n", c.Gateway.String())
|
||||
}
|
||||
fmt.Fprintf(&sb, "dhcp-option=6,1.1.1.1,8.8.8.8\n\n")
|
||||
|
||||
entries := make(map[string]string)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue