Skip to content

fix(operserv): match IPv6 address in OS FIND#20

Open
vjt wants to merge 1 commit into
azzurra:masterfrom
vjt:fix/os-find-ipv6
Open

fix(operserv): match IPv6 address in OS FIND#20
vjt wants to merge 1 commit into
azzurra:masterfrom
vjt:fix/os-find-ipv6

Conversation

@vjt
Copy link
Copy Markdown
Contributor

@vjt vjt commented May 28, 2026

Summary

OS FIND only matched the host wildcard against user->ip (the IPv4 long-int), so v6 users were never returned. Live repro on the network: OS F *@2a03:4000:2:33c:* returned End of search. Users found: 0. while users were clearly connected on that prefix.

ChanServ already has the v6 branch in do_akick (chanserv.c:2371) via get_ip6(user->ipv6). This patch applies the same against the OperServ FIND host disjunction, so masks like *@2a03:4000:2:33c:* now match IPv6-connected users.

The new branch lives inside ENABLE_CAPAB_NICKIP because user->ipv6 only exists in that build path (see inc/users.h:63-66).

Test plan

  • Build with ENABLE_CAPAB_NICKIP (default)
  • Connect a client via IPv6, e.g. 2a03:4000:2:33c::1
  • OS F *@2a03:4000:2:33c:* returns the client (previously: 0 found)
  • OS F *@<ipv4-mask> still matches v4 users (regression check)
  • Mask without ! (i.e. user@host) still parses

OS FIND only compared the host wildcard against user->ip (the IPv4
long-int), so IPv6 users were never matched. ChanServ already does the
v6 match in do_akick (chanserv.c:2371) via get_ip6(user->ipv6); apply
the same against the OperServ FIND host disjunction so that masks like
*@2a03:4000:2:33c:* find users connected on IPv6.

The branch lives inside ENABLE_CAPAB_NICKIP because user->ipv6 only
exists in that build path.
@vjt vjt requested a review from a team May 28, 2026 12:25
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