tailscale/wgengine
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
..
bench all: update golang.zx2c4.com/wireguard to github.com/tailscale/wireguard-go (#6692) 2022-12-09 15:12:20 -08:00
filter net/{packet,tstun},wgengine/filter: fix unknown IP protocol handling 2023-01-14 10:32:18 -08:00
magicsock ipn/ipnlocal, wgengine/magicsock: check Expired bool on Node; print error in Ping 2023-01-13 16:56:34 -05:00
monitor wgengine/monitor: don't log unhandled RTM_{NEW,DEL}LINK messages 2022-12-21 12:11:45 -05:00
netlog net/connstats: enforce maximum number of connections (#6760) 2022-12-16 10:14:00 -08:00
netstack wgengine/netstack: change netstack API to require LocalBackend 2022-12-23 14:01:26 -08:00
router all: update golang.zx2c4.com/wireguard to github.com/tailscale/wireguard-go (#6692) 2022-12-09 15:12:20 -08:00
wgcfg util/codegen, all: use latest year, not time.Now, in generated files 2023-01-02 20:38:32 -08:00
wgint all: update golang.zx2c4.com/wireguard to github.com/tailscale/wireguard-go (#6692) 2022-12-09 15:12:20 -08:00
wglog all: update golang.zx2c4.com/wireguard to github.com/tailscale/wireguard-go (#6692) 2022-12-09 15:12:20 -08:00
winnet all: remove old +build tags 2022-11-04 07:25:42 -07:00
mem_ios.go all: update golang.zx2c4.com/wireguard to github.com/tailscale/wireguard-go (#6692) 2022-12-09 15:12:20 -08:00
pendopen.go wgengine: remove all peer status from open timeout diagnostics 2022-08-29 15:54:33 -07:00
userspace_ext_test.go all: update golang.zx2c4.com/wireguard to github.com/tailscale/wireguard-go (#6692) 2022-12-09 15:12:20 -08:00
userspace_test.go all: convert more code to use net/netip directly 2022-07-25 21:53:49 -07:00
userspace.go net/dns,userspace: remove unused DNS paths, normalize query limit on iOS 2023-01-05 11:56:14 -08:00
watchdog_js.go wasm: drop pprof dependency 2022-06-07 12:16:16 -07:00
watchdog_test.go wgengine: remove all peer status from open timeout diagnostics 2022-08-29 15:54:33 -07:00
watchdog.go all: remove old +build tags 2022-11-04 07:25:42 -07:00
wgengine.go wgengine: fix typo in Engine.PeerForIP (#5912) 2022-10-12 14:14:22 -07:00