Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(RHEL-30645) resolved: never return ::1 when localhost or local hostname is resolved while IPv6 is off in the kernel #438

Open
wants to merge 11 commits into
base: rhel-8.10.0
Choose a base branch
from

Conversation

jacekmigacz
Copy link
Member

@jacekmigacz jacekmigacz commented Apr 23, 2024

No description provided.

poettering and others added 11 commits April 23, 2024 17:09
Given these files are part of procfs, let's use the correct API calls
for reading them.

This changes one occasion of read_one_line_file() to
read_full_virtual_file(), which superficially is a different thing, but
shouldn't actually be a difference, since sysctls can't be longer than
4K anyway, and the piecemeal logic behind read_one_line_file() cannot
work with the special semantics of procfs anyway.

(cherry picked from commit 4b30f2e)

Related: RHEL-30645
This is self-contained ans allows us later to use the provided APIs from
other code in src/basic/

(cherry picked from commit b0ffd27)

Related: RHEL-30645
And while we are at it, log about unexpected errors.

(cherry picked from commit 571ec99)

Related: RHEL-30645
(cherry picked from commit 83e03c4)

Related: RHEL-30645
…ed while IPv6 is off in the kernel

(cherry picked from commit 747b596)

Resolves: RHEL-30645
(cherry picked from commit a6b3b0a)

Related: RHEL-30645
Just some minor rework to make this more like nss-resolve.

(cherry picked from commit e09e7ac)

Related: RHEL-30645
…ily to ipv4

If the client never specified the address family, and IPv6 is off in the
kernel, then look only for A, never for AAAA RRs.

(cherry picked from commit 0438aa57751559295fee86d1c1f176486e518455)

Related: RHEL-30645
(cherry picked from commit bb78da1)

Related: RHEL-30645
(cherry picked from commit f96f5d5)

Related: RHEL-30645
@github-actions github-actions bot added pr/mention rhel-8.10.0 tracker/unapproved Formerly needs-acks pr/needs-ci Formerly needs-ci pr/needs-review Formerly needs-review labels Apr 23, 2024
Copy link

github-actions bot commented Apr 23, 2024

Commit validation

Tracker - RHEL-30645

The following commits meet all requirements

commit upstream
bf7fb8d - sysctl-util: use read_full_virtual_file() for reading sysctls systemd/systemd@4b30f2e
eb3fac4 - basic: move shared/sysctl-util.[ch] → basic/ systemd/systemd@b0ffd27
e5fde9f - socket-util: cache result of socket_ipv6_is_supported() systemd/systemd@571ec99
a10295e - socket-util: add helper for checking if IPv6 is enabled systemd/systemd@83e03c4
80a723c - resolved: never return ::1 when localhost or local hostname is resolve… systemd/systemd@747b596
e1e6a6d - sysctl-util: add sysctl_read_ip_property() systemd/systemd@a6b3b0a
7131246 - nss-myhostname: do not return IPv6 local address if IPv6 is disabled systemd/systemd@db50d32
4cc8082 - nss-myhostname: unify code that handles NOT_FOUND case systemd/systemd@e09e7ac
c344344 - resolved: if ipv6 is off patch hostname→address query with unspec fami… systemd/systemd@0438aa5
704ff20 - test: do not accept IPv6 local address if IPv6 is disabled systemd/systemd@bb78da1
a1a5f81 - socket-util: initialize variable with cleanup attribute systemd/systemd@f96f5d5

Follow-up detection

Failed

🔴 Some mentions of commits from this Pull Request were detected in upstream

Commit mentions

commit mention
bf7fb8d - sysctl-util: use read_full_virtual_file() for reading sysctls systemd/systemd@0e27527
7131246 - nss-myhostname: do not return IPv6 local address if IPv6 is disabled systemd/systemd@1c37629
systemd/systemd@a3b993c

Tracker validation

Success

🟢 Tracker RHEL-30645 has set desired product: rhel-8.9.0
🟢 Tracker RHEL-30645 has set desired component: systemd
🟢 Tracker RHEL-30645 has been approved


Pull Request validation

Failed

🔴 Failed or pending checks - build (stream8, GCC_ASAN)[failure],build (stream8, GCC)[failure] Failed or pending statuses - CentOS CI (CentOS Stream 8)[failure]
🔴 Review - Missing review from a member

@github-actions github-actions bot removed the tracker/unapproved Formerly needs-acks label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/mention pr/needs-ci Formerly needs-ci pr/needs-review Formerly needs-review rhel-8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants