aramperes/onetun

Handle WireGuardError::ConnectionExpired

TitanNano opened this issue · 1 comments

In wg.rs when an WireGuardError::ConnectionExpired is encountered, the error is just being logged.

"Failed to prepare routine packet for WireGuard endpoint: {:?}",

It would be much better if this error was handled and the connection re-established.

Looks like boringtun closes the UDP socket when this happens. I suppose we'd have to reopen a new one and reinitialize Tunn.

PR is welcome, otherwise I'll address this when I have time