tailscale/wgengine/filter
Brad Fitzpatrick c1a2e2c380 net/{packet,tstun},wgengine/filter: fix unknown IP protocol handling
01b90df2fa added SCTP support before
(with explicit parsing for ports) and
69de3bf7bf tried to add support for
arbitrary IP protocols (as long as the ACL permited a port of "*",
since we might not know how to find ports from an arbitrary IP
protocol, if it even has such a concept). But apparently that latter
commit wasn't tested end-to-end enough. It had a lot of tests, but the
tests made assumptions about layering that either weren't true, or
regressed since 1.20. Notably, it didn't remove the (*Filter).pre
bidirectional filter that dropped all "unknown" protocol packets both
leaving and entering, even if there were explicit protocol matches
allowing them in.

Also, don't map all unknown protocols to 0. Keep their IP protocol
number parsed so it's matchable by later layers. Only reject illegal
things.

Fixes #6423
Updates #2162
Updates #2163

Change-Id: I9659b3ece86f4db51d644f9b34df78821758842c
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-01-14 10:32:18 -08:00
..
filter_clone.go util/codegen, all: use latest year, not time.Now, in generated files 2023-01-02 20:38:32 -08:00
filter_test.go all: fix spelling mistakes 2022-09-29 13:36:13 -07:00
filter.go net/{packet,tstun},wgengine/filter: fix unknown IP protocol handling 2023-01-14 10:32:18 -08:00
match.go all: convert more code to use net/netip directly 2022-07-25 21:53:49 -07:00
tailcfg.go all: migrate more code code to net/netip directly 2022-08-02 13:59:57 -07:00