mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 03:31:39 +00:00
cmd/tailscale: fix "up" warning about netfilter-mode on Synology
Fixes #6811 Change-Id: Ia43723e6ebedc9b01729897cec271c462b16e9ae Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
f837d179b9
commit
8aac77aa19
@ -330,7 +330,11 @@ func prefsFromUpArgs(upArgs upArgsT, warnf logger.Logf, st *ipnstate.Status, goo
|
|||||||
prefs.ControlURL = upArgs.server
|
prefs.ControlURL = upArgs.server
|
||||||
prefs.WantRunning = true
|
prefs.WantRunning = true
|
||||||
prefs.RouteAll = upArgs.acceptRoutes
|
prefs.RouteAll = upArgs.acceptRoutes
|
||||||
|
if distro.Get() == distro.Synology {
|
||||||
|
// ipn.NewPrefs returns a non-zero Netfilter default. But Synology only
|
||||||
|
// supports "off" mode.
|
||||||
|
prefs.NetfilterMode = preftype.NetfilterOff
|
||||||
|
}
|
||||||
if upArgs.exitNodeIP != "" {
|
if upArgs.exitNodeIP != "" {
|
||||||
if err := prefs.SetExitNodeIP(upArgs.exitNodeIP, st); err != nil {
|
if err := prefs.SetExitNodeIP(upArgs.exitNodeIP, st); err != nil {
|
||||||
var e ipn.ExitNodeLocalIPError
|
var e ipn.ExitNodeLocalIPError
|
||||||
@ -879,6 +883,10 @@ func checkForAccidentalSettingReverts(newPrefs, curPrefs *ipn.Prefs, env upCheck
|
|||||||
// Issue 3176. Old prefs had 'RouteAll: true' on disk, so ignore that.
|
// Issue 3176. Old prefs had 'RouteAll: true' on disk, so ignore that.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if flagName == "netfilter-mode" && valNew == preftype.NetfilterOn && env.goos == "linux" && env.distro == distro.Synology {
|
||||||
|
// Issue 6811. Ignore on Synology.
|
||||||
|
continue
|
||||||
|
}
|
||||||
missing = append(missing, fmtFlagValueArg(flagName, valCur))
|
missing = append(missing, fmtFlagValueArg(flagName, valCur))
|
||||||
}
|
}
|
||||||
if len(missing) == 0 {
|
if len(missing) == 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user