tailscale/wgengine
Brad Fitzpatrick 3e493e0417 wgengine: fix lazy wireguard config bug on sent packet minute+ later
A comparison operator was backwards.

The bad case went:

* device A send packet to B at t=1s
* B gets added to A's wireguard config
* B gets packet

(5 minutes pass)

* some other activity happens, causing B to expire
  to be removed from A's network map, since it's
  been over 5 minutes since sent or received activity
* device A sends packet to B at t=5m1s
* normally, B would get added back, but the old send
  time was not zero (we sent earlier!) and the time
  comparison was backwards, so we never regenerated
  the wireguard config.

This also refactors the code for legibility and moves constants up
top, with comments.
2020-07-31 12:56:37 -07:00
..
filter wgengine/filter: remove leftover debug knob that staticcheck doesn't like 2020-07-30 11:21:37 -07:00
magicsock wgengine/magicsock: remove TODO comment that's no longer applicable 2020-07-30 21:33:37 -07:00
monitor wgengine: fix macos staticcheck errors (#557) 2020-07-14 17:28:02 -06:00
packet wgengine/filter: fix IPv4 IGMP spam omission, also omit ff02::16 spam 2020-07-30 11:00:20 -07:00
router router: split off sandboxed path from router_darwin (#624) 2020-07-31 01:10:14 -04:00
tsdns ipn: fix netmap change tracking and dns map generation (#609) 2020-07-28 21:47:23 -04:00
tstun wgengine: configure wireguard peers lazily, as needed 2020-07-24 12:50:15 -07:00
winnet Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
rusage.go Move "logger" package to under types, now that we have it. 2020-02-14 20:23:05 -08:00
rusage_nowindows.go wgengine: flesh out some docs 2020-02-12 13:37:45 -08:00
rusage_windows.go Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
userspace.go wgengine: fix lazy wireguard config bug on sent packet minute+ later 2020-07-31 12:56:37 -07:00
watchdog.go wgengine: add debug knob to disable the watchdog during debugging 2020-07-25 12:59:53 -07:00
watchdog_test.go wgengine: prevent log after exit in watchdog test 2020-07-03 10:52:39 -07:00
wgengine.go wgengine/magicsock: change API to not permit disco key changes 2020-07-06 12:10:39 -07:00