Skip to content

OpenBSD Wireguard implementation - #3750

Draft
snuffy22 wants to merge 1 commit into
ipspace:devfrom
snuffy22:openbsd-wg
Draft

OpenBSD Wireguard implementation#3750
snuffy22 wants to merge 1 commit into
ipspace:devfrom
snuffy22:openbsd-wg

Conversation

@snuffy22

@snuffy22 snuffy22 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

This is more open for comment than ready for commit.

Three issues:

  1. OpenBSD does not create IPv6 LLA addresses on WG interfaces because they are technically multipoint
  2. Wireguard IPv6 test does not set prefix length for loopback (so fails for OpenBSD which only does /128)
  3. Wireguard module does not support selecting only IPv4 or IPv6

One other question, is there a reason why we might do tunnel setup after our routing protocols like OSPF?
If tunnels happened before OSPF, I could move my 'non ideal' hack out of initial and just into the Wireguard config for OpenBSD.

Wireguard Test output
(py3-snuff) netlab@netlab:~/snuffy-netlab/tests/integration/tunnel$ netlab validate
[adj]     Check OSPFv2 adjacencies with DUT [ node(s): r2,r3 ]
[PASS]    r2: OSPFv2 neighbor 10.0.0.1 is in state Full/-
[PASS]    r3: OSPFv2 neighbor 10.0.0.1 is in state Full/-
[PASS]    Test succeeded in 0.3 seconds

[adj6]    Check OSPFv3 adjacencies with DUT [ node(s): r2,r3 ]
[PASS]    r2: OSPFv3 neighbor 10.0.0.1 is in state Full
[PASS]    r3: OSPFv3 neighbor 10.0.0.1 is in state Full
[PASS]    Test succeeded in 0.3 seconds

[pfx]     Check for DUT IPv4 loopback prefix being propagated to R2 [ node(s): r2,r3 ]
[PASS]    r2: The prefix 10.0.0.1/32 is in the OSPF topology
[PASS]    r3: The prefix 10.0.0.1/32 is in the OSPF topology
[PASS]    Test succeeded in 0.3 seconds

[pfx6]    Check for DUT IPv6 loopback prefix being propagated to R2 [ node(s): r2,r3 ]
[WAITING] Waiting for SPF to do its magic (retrying for 30 seconds)
[WAITING] Waiting for SPF to do its magic (14 seconds left)
[FAIL]    Node r2: The prefix 2001:db8:1:1::/64 is not in the OSPFv3 topology
[FAIL]    Node r3: The prefix 2001:db8:1:1::/64 is not in the OSPFv3 topology

[ping]    Check IPv4 connectivity over tunnel [ node(s): r2,r3 ]
[PASS]    r2: Ping to 10.0.0.1 succeeded
[PASS]    r3: Ping to 10.0.0.1 succeeded
[PASS]    Test succeeded in 0.3 seconds

[ping6]   Check IPv6 connectivity over tunnel [ node(s): r2,r3 ]
[PASS]    r2: Ping to ipv6 2001:db8:1:1::1 succeeded
[PASS]    r3: Ping to ipv6 2001:db8:1:1::1 succeeded
[PASS]    Test succeeded in 0.3 seconds

[mtu]     Check a full 1500-byte packet traverses the tunnel (underlay MTU 1560) [ node(s): r2,r3 ]
[PASS]    r2: Ping to 10.0.0.1 size 1500 succeeded
[PASS]    r3: Ping to 10.0.0.1 size 1500 succeeded
[PASS]    Test succeeded in 0.3 seconds

[x_ping]  Check end-to-end IPv4 connectivity [ node(s): r2 ]
[PASS]    r2: Ping to 10.0.0.3 succeeded
[PASS]    Test succeeded in 0.1 seconds

[x_ping6] Check end-to-end IPv6 connectivity [ node(s): r2 ]
[PASS]    r2: Ping to ipv6 2001:db8:1:3::1 succeeded
[PASS]    Test succeeded in 0.2 seconds

[FAIL]    16 tests completed, 2 tests failed
(py3-snuff) netlab@netlab:~/snuffy-netlab/tests/integration/tunnel$

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.

1 participant