Files
wg-portal/internal/app/users
Jacopo ClarkandGitHub a2ee8d1e46
Docker / Build and Push (push) Canceled after 0s
github-pages / deploy (push) Canceled after 0s
Test / make test (push) Canceled after 0s
Docker / release (push) Canceled after 0s
fix(ldap): do not create interfaces from interface_filter entries (#746)
updateInterfaceLdapFilters saved the matched users with SaveInterface,
which creates the interface when it is missing.

On first start that panics. The sync runs immediately (main.go:85) and
the importer later (main.go:116), so the sync creates a stub row for
every interface_filter key, and the importer, which snapshotted the
interface list before its device round-trips, then fails with "interface
already exists". The window is GetInterfaces plus GetPeers, so a
directory on localhost loses the race and a slower one hides it.

The stub rows are wrong anyway. They have no backend, so a typo in an
interface_filter key quietly created an interface attached to no
controller.

Look the interface up and skip with a warning when it is absent. The
filter is applied on the next sync once the importer has created it. A
lookup error that is not ErrNotFound also skips.

Signed-off-by: clark-ja <37738506+clark-ja@users.noreply.github.com>
2026-09-01 22:47:46 +02:00
..