summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-14 00:43:41 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-05-14 00:43:41 +0300
commit85c0c1ea222d2c70662de5a03ecaf04b6498006e (patch)
treeb14b199f63b7e1d2ba8dd2248d1cc7f86848cfd7 /docs
parent61ecb4e103c6a6225b3d71586f7f65e41c3e3510 (diff)
downloadvyos-documentation-85c0c1ea222d2c70662de5a03ecaf04b6498006e.tar.gz
vyos-documentation-85c0c1ea222d2c70662de5a03ecaf04b6498006e.zip
ci(doc-linter): check every IP on a line, not just the first
`lint_ipv4()` and `lint_ipv6()` used `re.search`, which returns only the first match. A line like Set DNS forwarder 192.0.2.1 then fall back to 8.8.8.8 flagged nothing because `192.0.2.1` (RFC 5737 documentation range) is allowed and the search stopped there. The real public IP `8.8.8.8` slipped through despite being exactly the case the linter was meant to catch. Switch both functions to `re.finditer` and walk every match: return on the first disallowed address; only return None when all matches on the line are allowed (private / multicast / non-global). Also fix the casing of "private space" in both error messages — was "private Space" with a stray capital. Verified with 7 hand-coded cases (allowed + public mixes, boundary cases, IPv6 RFC 3849 / Google DNS). All pass. Tracked as items 1, 2, and 10 of the rolling-side cleanup backlog from PR #2014 / #2019 / #2020 reviews. 🤖 Generated by [robots](https://vyos.io)
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions