Skip to content

fix: avoid matching TVK-AS with the VK-AS blacklist pattern - #34

Open
4erdenko wants to merge 1 commit into
C24Be:mainfrom
4erdenko:codex/fix-vk-as-name-matching
Open

4erdenko wants to merge 1 commit into
C24Be:mainfrom
4erdenko:codex/fix-vk-as-name-matching

Conversation

@4erdenko

Copy link
Copy Markdown

The VK-AS alternative in BLACK_NAMES also matches TVK-AS. This selects the MTS records AS43038 TVK-AS (MTS PJSC) and AS43720 TVK-AS (MTS OJSC) and includes their announced networks in the general blacklist, affecting residential subscribers.

Match VK-AS as a complete name using POSIX character classes. Add regression tests that exercise the shared configuration through sh and grep -iE, covering the two MTS records, case-insensitive exact matches, name boundaries, and independent blacklist terms.

Validation:

  • python -m unittest discover -s tests -v: all 7 tests pass, including 3 new tests with 14 cases.
  • The new negative cases reproduce the false positive on the original rule.
  • sh -n blacklists_updater_common.subr and git diff --check pass.
  • Comparing the old and new selectors against the checked-in source data removes only AS43038 and AS43720 from the ASN selection. IPv4 source selections are unchanged.

Generated blacklists are left to the existing update workflow after merge. This PR fixes the generator; it does not immediately change the published lists. No subscriber IP addresses or connection logs are included.

Match VK-AS as a complete name and cover the MTS false positives with shell-based regression tests.
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