tailscale/net/portmapper
Jordan Whited 25a0091f69
net/portmapper: relax handling of UPnP resp (#6946)
Gateway devices operating as an HA pair w/VRRP or CARP may send UPnP
replies from static addresses rather than the floating gateway address.
This commit relaxes our source address verification such that we parse
responses from non-gateway IPs, and re-point the UPnP root desc
URL to the gateway IP. This ensures we are still interfacing with the
gateway device (assuming L2 security intact), even though we got a
root desc from a non-gateway address.

This relaxed handling is required for ANY port mapping to work on certain
OPNsense/pfsense distributions using CARP at the time of writing, as
miniupnpd may only listen on the static, non-gateway interface address
for PCP and PMP.

Fixes #5502

Signed-off-by: Jordan Whited <jordan@tailscale.com>
2023-01-12 16:57:02 -08:00
..
disabled_stubs.go all: remove old +build tags 2022-11-04 07:25:42 -07:00
igd_test.go all: fix spelling mistakes 2022-09-29 13:36:13 -07:00
pcp_test.go all: use various net/netip parse funcs directly 2022-07-25 21:12:28 -07:00
pcp.go all: migrate more code code to net/netip directly 2022-08-02 13:59:57 -07:00
pcpresultcode_string.go net/portmapper: make PCP/PMP result codes stringers 2021-11-30 12:13:15 -08:00
pmpresultcode_string.go net/portmapper: make PCP/PMP result codes stringers 2021-11-30 12:13:15 -08:00
portmapper_test.go net/netaddr: start migrating to net/netip via new netaddr adapter package 2022-07-25 16:20:43 -07:00
portmapper.go net/portmapper: relax handling of UPnP resp (#6946) 2023-01-12 16:57:02 -08:00
upnp_test.go net/portmapper: add test for Huawei router 2022-11-25 07:42:31 -08:00
upnp.go net/portmapper: relax handling of UPnP resp (#6946) 2023-01-12 16:57:02 -08:00