Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create IpPacketRouter #4068

Merged
merged 11 commits into from
Nov 3, 2023
Merged

Create IpPacketRouter #4068

merged 11 commits into from
Nov 3, 2023

Conversation

octol
Copy link
Contributor

@octol octol commented Oct 27, 2023

Description

Create IpPacketRouter

@@ -123,7 +123,7 @@ impl TunDevice {

// This is how wireguard does it, by consulting the AllowedIPs table.
if false {
let peers = self.peers_by_ip.lock().await;
let peers = self.peers_by_ip.as_ref().unwrap().lock().await;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're just always unwrapping it, what's the point of wrapping it in an option in the first place?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well this is draft so ... ;)
Hold your horses

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 🏇🏻

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There we go, no more unwrap :)

@octol octol force-pushed the jon/embedded-ip-forwarder-in-gateway branch from 6daca7f to 49cf33f Compare October 30, 2023 10:42
Base automatically changed from jon/embedded-ip-forwarder-in-gateway to develop October 31, 2023 13:48
@octol octol force-pushed the jon/ip-forwarder-tun-device branch from a955ef8 to f39ffc7 Compare November 2, 2023 10:20
@octol octol changed the title Create IpForwarderService Create IpPacketRouter Nov 2, 2023
@octol octol force-pushed the jon/ip-forwarder-tun-device branch from 0490762 to 6052a9e Compare November 2, 2023 13:18
@octol octol force-pushed the jon/ip-forwarder-tun-device branch from c8d7705 to 756aca3 Compare November 3, 2023 08:26
@octol octol marked this pull request as ready for review November 3, 2023 08:32
@octol octol merged commit 9f2bff2 into develop Nov 3, 2023
16 checks passed
@octol octol deleted the jon/ip-forwarder-tun-device branch November 3, 2023 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants