f-43: dhcp: fix default route create for nothing #43
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
57448d758f
commit
52d214404d
2 changed files with 3 additions and 1 deletions
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ type Config struct {
|
|||
Network *net.IPNet
|
||||
VPCGateway net.IP // next-hop for VPCRoute (option 121)
|
||||
VPCRoute *net.IPNet // if non-nil, emit dhcp-option=121,VPCRoute,VPCGateway
|
||||
DefaultGateway net.IP // if non-nil, emit dhcp-option=3,DefaultGateway
|
||||
DefaultGateway net.IP // if non-nil, emit dhcp-option=3,DefaultGateway; if nil, emit a bare dhcp-option=3 to suppress the dnsmasq default
|
||||
Name string
|
||||
ConfDir string
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue