internal: record correct interfaces for queries from router on Firewalla

This commit is contained in:
Cuong Manh Le
2023-07-25 20:28:30 +00:00
committed by Cuong Manh Le
parent 12c8ab696f
commit 59dc74ffbb
3 changed files with 62 additions and 23 deletions
+10
View File
@@ -188,6 +188,16 @@ func ServiceDependencies() []string {
return nil
}
// SelfInterfaces return list of *net.Interface that will be source of requests from router itself.
func SelfInterfaces() []*net.Interface {
switch Name() {
case firewalla.Name:
return dnsmasq.FirewallaSelfInterfaces()
default:
return nil
}
}
func distroName() string {
switch {
case bytes.HasPrefix(unameO(), []byte("DD-WRT")):