various: implement stateful firewalling on Linux (#12025)
Updates https://github.com/tailscale/corp/issues/19623 Change-Id: I7980e1fb736e234e66fa000d488066466c96ec85 Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Co-authored-by: Andrew Dunham <andrew@du.nham.ca>
This commit is contained in:
@ -23,8 +23,8 @@ func mustCIDRs(ss ...string) []netip.Prefix {
|
||||
func TestConfigEqual(t *testing.T) {
|
||||
testedFields := []string{
|
||||
"LocalAddrs", "Routes", "LocalRoutes", "NewMTU",
|
||||
"SubnetRoutes", "SNATSubnetRoutes", "NetfilterMode",
|
||||
"NetfilterKind",
|
||||
"SubnetRoutes", "SNATSubnetRoutes", "StatefulFiltering",
|
||||
"NetfilterMode", "NetfilterKind",
|
||||
}
|
||||
configType := reflect.TypeFor[Config]()
|
||||
configFields := []string{}
|
||||
@ -125,6 +125,16 @@ func TestConfigEqual(t *testing.T) {
|
||||
&Config{SNATSubnetRoutes: false},
|
||||
true,
|
||||
},
|
||||
{
|
||||
&Config{StatefulFiltering: false},
|
||||
&Config{StatefulFiltering: true},
|
||||
false,
|
||||
},
|
||||
{
|
||||
&Config{StatefulFiltering: false},
|
||||
&Config{StatefulFiltering: false},
|
||||
true,
|
||||
},
|
||||
|
||||
{
|
||||
&Config{NetfilterMode: preftype.NetfilterOff},
|
||||
|
Reference in New Issue
Block a user