DHCP detection doesn't seem to work as non-root

Maybe it should be started before the uid switch
This commit is contained in:
Frank Denis 2025-01-10 23:27:41 +01:00
parent 5b8c65a42e
commit 65ada71a34

View file

@ -122,6 +122,9 @@ func (plugin *PluginForward) Init(proxy *Proxy) error {
} }
} }
if requiresDHCP { if requiresDHCP {
if len(proxy.userName) > 0 {
dlog.Warn("DHCP/DNS detection may not work when `user_name` is set or when starting as a non-root user")
}
if proxy.SourceIPv6 { if proxy.SourceIPv6 {
dlog.Info("Starting a DHCP/DNS detector for IPv6") dlog.Info("Starting a DHCP/DNS detector for IPv6")
d6 := &dhcpdns.Detector{RemoteIPPort: "[2001:DB8::53]:80"} d6 := &dhcpdns.Detector{RemoteIPPort: "[2001:DB8::53]:80"}