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

dfp: Insert correct preresolved hostname key in DNS cache #30784

Merged
merged 5 commits into from
Nov 10, 2023

Commits on Nov 8, 2023

  1. dfp: Insert correct preresolved hostname key in DNS cache

    Previously, preresolved hostnames didn't include the port in the `host`
    that is used as a key in the DNS cache. This behavior differed from the
    regular resolution path which always normalized the host (via
    DnsHostInfo::normalizeHostForDfp). There was also a bug in the
    DnsCacheImplTest.PreresolveSuccess test, where the preresolve hostnames
    config included the port in the socket address, which is not how it
    would normally be specified and masked this issue.
    
    This PR fixes the problem by ensuring the preresolved hostnames have the
    host normalized (via DnsHostInfo::normalizeHostForDfp) before inserting
    into the DNS cache, just like the host is normalized before retrieving
    from the DNS cache. The test issue is also fixed so we can now verify
    that the correct cache key is being used for insertion, retrieval, and
    removal, and test coverage is added to ensure we can fetch the cache
    entry correctly whether the host includes the port or not.
    
    Signed-off-by: Ali Beyad <[email protected]>
    abeyad committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    f426016 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2023

  1. strcat

    Signed-off-by: Ali Beyad <[email protected]>
    abeyad committed Nov 9, 2023
    Configuration menu
    Copy the full SHA
    921fd80 View commit details
    Browse the repository at this point in the history
  2. add runtime guard

    Signed-off-by: Ali Beyad <[email protected]>
    abeyad committed Nov 9, 2023
    Configuration menu
    Copy the full SHA
    4b98e17 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2023

  1. lizan feedback

    Signed-off-by: Ali Beyad <[email protected]>
    abeyad committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    26b0978 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    97da9ef View commit details
    Browse the repository at this point in the history