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

Fix bug in DNSSD IPv6 address string conversion. #14

Merged
merged 4 commits into from
Jan 9, 2024

Commits on Jan 4, 2024

  1. Fix bug in DNSSD IPv6 address string conversion.

    The old implementation converted each byte to a hexadecimal number
    separately, meaning that leading zeros in a byte would be dropped
    even in the middle of a group.
    
    For example, the address 2620:149:110b:470e:0:0:0:e1a was incorrectly
    rendered as              2620:149:11b:47e:0:0:0:e1a, with zeros dropped
    in the 3rd and 4th octets.
    
    I figured the most robust fix would be to use inet_ntop to format the
    address, which produces a correctly abbreviated address like
    2620:149:110b:470e::e1a. This is the approach used in DNSResolver_c-ares.swift.
    Torin Rudeen committed Jan 4, 2024
    Configuration menu
    Copy the full SHA
    30b35d0 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2024

  1. Throw error when too-short address is returned

    Torin Rudeen committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    1a97690 View commit details
    Browse the repository at this point in the history
  2. Fix formatting issues

    Torin Rudeen committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    6fd9699 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0ca7fc5 View commit details
    Browse the repository at this point in the history