mirror of https://github.com/tailscale/tailscale/
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.reviewable/pr630/r1
parent
c253d4f948
commit
3e493e0417
Loading…
Reference in New Issue