boringtun icon indicating copy to clipboard operation
boringtun copied to clipboard

device: Allow modifying peers

Open ernestask opened this issue 2 years ago • 5 comments

Currently, updating peers without replacing them is not implemented, which can mess up state tracking, especially when the last handshake time stops being a thing all of a sudden. This commit introduces API changes to Peer to allow modifying specific fields and replaces the panic macro with actual setting of said fields.

Fixes https://github.com/cloudflare/boringtun/issues/40

ernestask avatar Apr 20 '22 08:04 ernestask

@Noah-Kennedy

ernestask avatar May 25 '22 10:05 ernestask

@ernestask I am rewriting device. It should be done shortly. Once this is in, I'd suggest redoing this.

Noah-Kennedy avatar Jun 28 '22 18:06 Noah-Kennedy

All right, thanks for the heads-up!

ernestask avatar Jun 29 '22 02:06 ernestask

Does 0.5.0 mark the device rewrite?

ernestask avatar Jul 12 '22 10:07 ernestask

Not yet, that work got split out sadly.

Noah-Kennedy avatar Jul 12 '22 11:07 Noah-Kennedy

Thanks for this work @ernestask to give us something to work with until Noah's rewrite is done!

ngc0202 avatar Oct 27 '22 12:10 ngc0202

Hey @Noah-Kennedy ,

Are you still working on the rewrite?

bestmike007 avatar Aug 25 '23 06:08 bestmike007

There is the noah/tokio branch, but I’m not sure if that’s it.

In any case, we’ve been running this code in production (https://github.com/NordSecurity/boringtun/tree/libtelio-master, fairly old base, but we’re already rebasing atop 0.5.2) with only a single issue propping up, which I’ve fixed here recently. Hard to say what would happen post-rewrite, but it might be someone else proposing a different solution.

ernestask avatar Aug 25 '23 09:08 ernestask