f-43: dhcp: fix default route create for nothing #43

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2026-08-24 21:18:52 +02:00
commit 52d214404d
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
2 changed files with 3 additions and 1 deletions

View file

@ -19,6 +19,8 @@ func GenerateConfig(c Config) (string, map[string]string, error) {
}
if c.DefaultGateway != nil {
fmt.Fprintf(&sb, "dhcp-option=3,%s\n", c.DefaultGateway.String())
} else {
fmt.Fprintf(&sb, "dhcp-option=3\n")
}
fmt.Fprintf(&sb, "dhcp-option=6,1.1.1.1,8.8.8.8\n\n")