mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-28 03:52:35 +00:00
support running in a FreeBSD jail
Since devd apparently can't be made to work in a FreeBSD jail fall back to polling. Fixes tailscale#2858 Signed-off-by: Todd Neal <todd@tneal.org>
This commit is contained in:
parent
69de3bf7bf
commit
eeccbccd08
@ -25,10 +25,11 @@ type devdConn struct {
|
|||||||
conn net.Conn
|
conn net.Conn
|
||||||
}
|
}
|
||||||
|
|
||||||
func newOSMon(logf logger.Logf, _ *Mon) (osMon, error) {
|
func newOSMon(logf logger.Logf, m *Mon) (osMon, error) {
|
||||||
conn, err := net.Dial("unixpacket", "/var/run/devd.seqpacket.pipe")
|
conn, err := net.Dial("unixpacket", "/var/run/devd.seqpacket.pipe")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("devd dial error: %v", err)
|
logf("devd dial error: %v, falling back to polling method", err)
|
||||||
|
return newPollingMon(logf, m)
|
||||||
}
|
}
|
||||||
return &devdConn{conn}, nil
|
return &devdConn{conn}, nil
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build !freebsd && !windows && !darwin
|
//go:build !windows && !darwin
|
||||||
// +build !freebsd,!windows,!darwin
|
// +build !windows,!darwin
|
||||||
|
|
||||||
package monitor
|
package monitor
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user