mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-09 16:11:23 +00:00
linuxfw,wgengine/route,ipn: add c2n and nodeattrs to control linux netfilter
Updates tailscale/corp#14029. Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
@@ -60,6 +60,7 @@ func TestPrefsEqual(t *testing.T) {
|
||||
"AutoUpdate",
|
||||
"AppConnector",
|
||||
"PostureChecking",
|
||||
"NetfilterKind",
|
||||
"Persist",
|
||||
}
|
||||
if have := fieldsOf(reflect.TypeOf(Prefs{})); !reflect.DeepEqual(have, prefsHandles) {
|
||||
@@ -327,6 +328,16 @@ func TestPrefsEqual(t *testing.T) {
|
||||
&Prefs{PostureChecking: false},
|
||||
false,
|
||||
},
|
||||
{
|
||||
&Prefs{NetfilterKind: "iptables"},
|
||||
&Prefs{NetfilterKind: "iptables"},
|
||||
true,
|
||||
},
|
||||
{
|
||||
&Prefs{NetfilterKind: "nftables"},
|
||||
&Prefs{NetfilterKind: ""},
|
||||
false,
|
||||
},
|
||||
}
|
||||
for i, tt := range tests {
|
||||
got := tt.a.Equals(tt.b)
|
||||
@@ -545,6 +556,20 @@ func TestPrefsPretty(t *testing.T) {
|
||||
"linux",
|
||||
`Prefs{ra=false mesh=false dns=false want=false routes=[] nf=off update=off Persist=nil}`,
|
||||
},
|
||||
{
|
||||
Prefs{
|
||||
NetfilterKind: "iptables",
|
||||
},
|
||||
"linux",
|
||||
`Prefs{ra=false mesh=false dns=false want=false routes=[] nf=off netfilterKind=iptables update=off Persist=nil}`,
|
||||
},
|
||||
{
|
||||
Prefs{
|
||||
NetfilterKind: "",
|
||||
},
|
||||
"linux",
|
||||
`Prefs{ra=false mesh=false dns=false want=false routes=[] nf=off update=off Persist=nil}`,
|
||||
},
|
||||
}
|
||||
for i, tt := range tests {
|
||||
got := tt.p.pretty(tt.os)
|
||||
|
Reference in New Issue
Block a user