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

Commits on Apr 23, 2024

  1. sysctl-util: use read_full_virtual_file() for reading sysctls

    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
    poettering authored and jacekmigacz committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    bf7fb8d View commit details
    Browse the repository at this point in the history
  2. basic: move shared/sysctl-util.[ch] → basic/

    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
    poettering authored and jacekmigacz committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    eb3fac4 View commit details
    Browse the repository at this point in the history
  3. socket-util: cache result of socket_ipv6_is_supported()

    And while we are at it, log about unexpected errors.
    
    (cherry picked from commit 571ec99)
    
    Related: RHEL-30645
    poettering authored and jacekmigacz committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    e5fde9f View commit details
    Browse the repository at this point in the history
  4. socket-util: add helper for checking if IPv6 is enabled

    (cherry picked from commit 83e03c4)
    
    Related: RHEL-30645
    poettering authored and jacekmigacz committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    a10295e View commit details
    Browse the repository at this point in the history
  5. resolved: never return ::1 when localhost or local hostname is resolv…

    …ed while IPv6 is off in the kernel
    
    (cherry picked from commit 747b596)
    
    Resolves: RHEL-30645
    poettering authored and jacekmigacz committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    80a723c View commit details
    Browse the repository at this point in the history
  6. sysctl-util: add sysctl_read_ip_property()

    (cherry picked from commit a6b3b0a)
    
    Related: RHEL-30645
    yuwata authored and jacekmigacz committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    e1e6a6d View commit details
    Browse the repository at this point in the history
  7. nss-myhostname: do not return IPv6 local address if IPv6 is disabled

    (cherry picked from commit db50d32)
    
    Related: RHEL-30645
    yuwata authored and jacekmigacz committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    7131246 View commit details
    Browse the repository at this point in the history
  8. nss-myhostname: unify code that handles NOT_FOUND case

    Just some minor rework to make this more like nss-resolve.
    
    (cherry picked from commit e09e7ac)
    
    Related: RHEL-30645
    poettering authored and jacekmigacz committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    4cc8082 View commit details
    Browse the repository at this point in the history
  9. resolved: if ipv6 is off patch hostname→address query with unspec fam…

    …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
    poettering authored and jacekmigacz committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    c344344 View commit details
    Browse the repository at this point in the history
  10. test: do not accept IPv6 local address if IPv6 is disabled

    (cherry picked from commit bb78da1)
    
    Related: RHEL-30645
    yuwata authored and jacekmigacz committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    704ff20 View commit details
    Browse the repository at this point in the history
  11. socket-util: initialize variable with cleanup attribute

    (cherry picked from commit f96f5d5)
    
    Related: RHEL-30645
    yuwata authored and jacekmigacz committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    a1a5f81 View commit details
    Browse the repository at this point in the history