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

connlib: allocate IPv6 address with relay #3406

Closed
thomaseizinger opened this issue Jan 25, 2024 · 2 comments · Fixed by #3436
Closed

connlib: allocate IPv6 address with relay #3406

thomaseizinger opened this issue Jan 25, 2024 · 2 comments · Fixed by #3436
Assignees
Labels
area/connlib Firezone's core connectivity library kind/feature New feature or request

Comments

@thomaseizinger
Copy link
Member

Currently, we only ever allocate an IPv4 address with the relay in firezone-connection:

fn make_allocate_request() -> Message<Attribute> {
let mut message = Message::new(
MessageClass::Request,
ALLOCATE,
TransactionId::new(random()),
);
message.add_attribute(RequestedTransport::new(17));
// message.add_attribute(AdditionalAddressFamily::new(AddressFamily::V6)); TODO: Request IPv6 binding.
message

We should also (always?) request an IPv6 address. This would allow us to talk to IPv6-only gateways or clients.

@thomaseizinger thomaseizinger added kind/feature New feature or request area/connlib Firezone's core connectivity library labels Jan 25, 2024
@jamilbk
Copy link
Member

jamilbk commented Jan 29, 2024

We should also (always?) request an IPv6 address.

Always should be a fine assumption if that reduces complexity a bit

@thomaseizinger
Copy link
Member Author

Unfortunately, I can't test this with docker because IPv6 networks with compose aren't properly supported. We are essentially waiting for moby/moby#43033 to be merged and release.

github-merge-queue bot pushed a commit that referenced this issue Jan 30, 2024
Resolve the two TODOs mentioned in the code. As part of #3399, we
correctly are handling different combinations of available sockets and
requested addresses in the relay more gracefully. In particular, we
return whatever addresses we could allocate and only fail if we couldn't
allocate any at all.

The `Allocation` struct will extract whatever allocated addresses are
present in the response. Thus, it is safe for us to **always** request
both, an IPv4 and IPv6 address. A relay that only operates on one of
them will just return that one address.

Resolves: #3406.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connlib Firezone's core connectivity library kind/feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants