You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/wgengine
Josh Bleecher Snyder 59026a291d wgengine/wglog: improve wireguard-go logging rate limiting
Prior to wireguard-go using printf-style logging,
all wireguard-go logging occurred using format string "%s".
We fixed that but continued to use %s when we rewrote
peer identifiers into Tailscale style.

This commit removes that %sl, which makes rate limiting work correctly.
As a happy side-benefit, it should generate less garbage.

Instead of replacing all wireguard-go peer identifiers
that might occur anywhere in a fully formatted log string,
assume that they only come from args.
Check all args for things that look like *device.Peers
and replace them with appropriately reformatted strings.

There is a variety of ways that this could go wrong
(unusual format verbs or modifiers, peer identifiers
occurring as part of a larger printed object, future API changes),
but none of them occur now, are likely to be added,
or would be hard to work around if they did.

Signed-off-by: Josh Bleecher Snyder <josharian@gmail.com>
4 years ago
..
bench all: delete wgcfg.Key and wgcfg.PrivateKey 4 years ago
filter net/packet, wgengine/{filter,tstun}: add TSMP ping 4 years ago
magicsock all: delete wgcfg.Key and wgcfg.PrivateKey 4 years ago
monitor wgengine/monitor: reduce Linux log spam on down 4 years ago
netstack wgengine/netstack: log error when acceptUDP fails 4 years ago
router net/dns: add GOOS build tags 4 years ago
wgcfg all: delete wgcfg.Key and wgcfg.PrivateKey 4 years ago
wglog wgengine/wglog: improve wireguard-go logging rate limiting 4 years ago
winnet wgengine/winnet: don't build on non-windows 4 years ago
pendopen.go wgengine: quiet connection failure diagnostics for exit nodes 4 years ago
userspace.go wgengine: periodically poll engine status for logging side effect 4 years ago
userspace_ext_test.go cmd/tailscaled, wgengine{,/netstack}: add netstack hybrid mode, add to Windows 4 years ago
userspace_test.go cmd/tailscaled, wgengine{,/netstack}: add netstack hybrid mode, add to Windows 4 years ago
watchdog.go wgengine: take in dns.Config, split out to resolver.Config and dns.OSConfig. 4 years ago
watchdog_test.go wgengine: extend TestWatchdog timeout on macOS 4 years ago
wgengine.go tailcfg: add Endpoint, EndpointType, MapRequest.EndpointType 4 years ago