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

local IPv6 address is calculated differently on little and big endian platforms #4

Open
dangowrt opened this issue Mar 20, 2024 · 0 comments

Comments

@dangowrt
Copy link
Member

The IPv6 addresses used within the wireguard tunnels are derived from the public key. However, it seems like the derivation function is not endian-safe, so the resulting address differs e.g. on MIPS and Aarch64 platforms.
Example:

on Aarch64 (LE)

peer: NeEK/xTlBKty2RpcigGIc+243vJ+eU98o3YJXkWEG1M=
  ...
  allowed ips: fd03:6cd6:e922:344d:5305:2021:e003:a5f8/128

on MIPS (BE)

peer: NeEK/xTlBKty2RpcigGIc+243vJ+eU98o3YJXkWEG1M=
  ...
  allowed ips: fd20:a740:1e2f:7e3a:4a5c:f6d5:2f26:a64/128
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

No branches or pull requests

1 participant