mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
all: dealing with VLAN config on Firewalla
Firewalla ignores 127.0.0.1 in all VLAN config, so making 127.0.0.1 as dnsmasq upstream would break thing when multiple VLAN presents. To deal with this, we need to gather all interfaces available, and making them as upstream of dnsmasq. Then changing ctrld to listen on all interfaces, too. It also leads to better improvement for dnsmasq configuration template, as the upstream server can now be generated dynamically instead of hard coding to 127.0.0.1:5354.
This commit is contained in:
committed by
Cuong Manh Le
parent
a4c1983657
commit
f3a3227f21
@@ -220,6 +220,13 @@ func Cleanup(svc *service.Config) error {
|
||||
|
||||
// ListenIP returns the listener IP of ctrld on router.
|
||||
func ListenIP() string {
|
||||
name := Name()
|
||||
switch name {
|
||||
case Firewalla:
|
||||
// Firewalla excepts 127.0.0.1 in all interfaces config. So we need to listen on all interfaces,
|
||||
// making dnsmasq to be able to forward DNS query to specific interface based on VLAN config.
|
||||
return "0.0.0.0"
|
||||
}
|
||||
return "127.0.0.1"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user