Page MenuHomeFreeBSD

tests: extend wireguard test to cover incremental allowed-ips updates
ClosedPublic

Authored by kevans on May 21 2025, 4:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jul 14, 12:58 PM
Unknown Object (File)
Mon, Jul 14, 12:58 PM
Unknown Object (File)
Mon, Jul 14, 12:58 PM
Unknown Object (File)
Mon, Jul 14, 12:58 PM
Unknown Object (File)
Mon, Jul 14, 12:58 PM
Unknown Object (File)
Tue, Jul 8, 6:46 AM
Unknown Object (File)
Mon, Jul 7, 2:34 AM
Unknown Object (File)
Sat, Jul 5, 9:25 PM

Details

Summary

New +/- syntax in wg(8) allows us to add or remove just a single
allowed-ip rather than forcing replacement or weird tricks to do an
atomic removal. Ensure that it works now that we've added kernel
support for it.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tests for adding an aip that already exists and removing an aip that doesn't exist would be nice.

tests/sys/net/if_wg.sh
442

as there are AF-specific branches in the kernel part, we should test both inet and inet6 addresses.

kevans added inline comments.
tests/sys/net/if_wg.sh
442

I'm adding a basic IPv6 test, but the parts that branch out for INET6 don't change the semantics of the functionality so I'm not sure I'll go as far as duplicating all of them.

kevans marked an inline comment as done.

Add more tests:

  • Basic IPv6 tests
  • Removal of an IP that is not assigned at all
  • Removal of an IP that is assigned to another peer
  • Stealing an IP from another peer
  • Adding an IP that's already there
This revision is now accepted and ready to land.Jun 17 2025, 3:44 PM