summaryrefslogtreecommitdiffhomepage
path: root/wf
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josh@tailscale.com>2021-05-14 18:07:28 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2021-05-16 14:52:00 -0700
commit25df067dd0c854eebcd2841b82ad92ebb1d77165 (patch)
tree5386f701942d2021036697d3d7ee4b6650c40850 /wf
parent4f92f405eeaf2c6d9dffab74a0e38095213b69b7 (diff)
downloadtailscale-25df067dd0c854eebcd2841b82ad92ebb1d77165.tar.xz
tailscale-25df067dd0c854eebcd2841b82ad92ebb1d77165.zip
all: adapt to opaque netaddr types
This commit is a mishmash of automated edits using gofmt: gofmt -r 'netaddr.IPPort{IP: a, Port: b} -> netaddr.IPPortFrom(a, b)' -w . gofmt -r 'netaddr.IPPrefix{IP: a, Port: b} -> netaddr.IPPrefixFrom(a, b)' -w . gofmt -r 'a.IP.Is4 -> a.IP().Is4' -w . gofmt -r 'a.IP.As16 -> a.IP().As16' -w . gofmt -r 'a.IP.Is6 -> a.IP().Is6' -w . gofmt -r 'a.IP.As4 -> a.IP().As4' -w . gofmt -r 'a.IP.String -> a.IP().String' -w . And regexps: \w*(.*)\.Port = (.*) -> $1 = $1.WithPort($2) \w*(.*)\.IP = (.*) -> $1 = $1.WithIP($2) And lots of manual fixups. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Diffstat (limited to 'wf')
-rw-r--r--wf/firewall.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/wf/firewall.go b/wf/firewall.go
index 0eda66e7b..2fc7a3d5b 100644
--- a/wf/firewall.go
+++ b/wf/firewall.go
@@ -218,7 +218,7 @@ func (f *Firewall) UpdatePermittedRoutes(newRoutes []netaddr.IPPrefix) error {
},
}
var p protocol
- if r.IP.Is4() {
+ if r.IP().Is4() {
p = protocolV4
} else {
p = protocolV6