fix: no IPv6 grant pattern that refuses part of its prefix; refuse a replica before changing it #50
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel!50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/grant-compressed-ipv6"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in the Template B smoke test of 2026-09-30.
The grant
MariaDB matches a grant's host against the text of the client's address, which compresses zero groups.
suggest-addressprintsfd3d:80b2:d0d7::/64, keel grantedrepl@'fd3d:80b2:d0d7:0:%', and the replica atfd3d:80b2:d0d7::2was refused. Every overlay prefix suggest-address produces has a zero fourth group, so the documented prefix form failed on all of them.Checked on mariadb-server 11.8.6 (Debian 13), in a throwaway LXC with a client network namespace:
fd3d:80b2:d0d7:0:%::2, admitsfd3d:80b2:d0d7:0:1::fd3d:80b2:d0d7::/64,.../ffff:ffff:ffff:ffff::, expanded netmaskfd3d:80b2:d0d7:0:0:0:0:2fd3d:80b2:d0d7::2FD3D:80B2:D0D7::210.9.0.0/255.255.255.0,10.9.0.%10.9.0.0/24does notMariaDB has no IPv6 netmask, so the only form left is a LIKE pattern.
g1:...:gn:%matches every address of the prefix, and no other, exactly when no prefix group can be compressed away: the last group is not zero and no two zero groups are next to each other. When some can, adding a second pattern with::does not fix it in general, because%cannot count the groups::stands for (2001::5:%matches2001::5:a:b, which is outside2001:0:0:5::/64).So:
2804:710:d0:5::/64,2001:db8:0:5::/64) keep their pattern./56refusal.The grants keel now generates were run against the same server:
fd3d:80b2:d0d7::2(written expanded in the spec) admits::2and refuses::3;2001:db8:0:5::/64admits::9and:a:b:c:dand refuses2001:db8:0:6::1.The replica refusal
A replica that apply declines to build (it holds databases and has no
--destroy-local-database, has no credential, and so on) is now refused before the configuration step. The drop-in is not rewritten and MariaDB is not restarted. The message now says exactly that, where before it said "Nothing was changed" after the restart had already happened.Also
require-changelogneeds a greater version, so this is not added to 0.11.0.Test plan
set -o pipefail; coverage run -m pytest: 1636 passed, coverage 99%