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

fqdn proxy: fix data race by using separate sessionUDPFactories #28163

Merged
merged 4 commits into from
Sep 18, 2023

Commits on Sep 15, 2023

  1. fqdn proxy: fix data race by using separate sessionUDPFactories

    PR cilium#25309 introduced a data race by sharing the sessionUDPFactory between the
    DNS server instances for the different IP families (IPv4 & IPv6). This has been detected
    by cilium#27979.
    
    This commit fixes the data race by using dedicated instances of the sessionUDPFactory.
    
    Fixes: cilium#28156
    
    Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
    mhofstetter committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    e4f7d2d View commit details
    Browse the repository at this point in the history
  2. fqdn proxy: replace global response conn with field in SessionUDPFactory

    This commit replaces the global response UDP connections (IPv4 & IPv6)
    variables with fields in the SessionUDPFactory. This way the connections
    can already be setup during construction of the factory and the `sync.Once`s
    (global vars) can be removed.
    
    Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
    mhofstetter committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    9fcf541 View commit details
    Browse the repository at this point in the history
  3. fqdn proxy: binding socketUDPFactory to specific IP family

    Historically, the `socketUDPFactory` and the lilsten configuration
    supported IPv4 and IPv6 on the same socket.
    
    Since the change to bind the DNS servers to localhost, a server
    and socket is created per ip family.
    
    Therefore this commit removes the support for multiple ipfamilies
    on the same socket (SocketUDPFactory & listen configuration). This
    improves readability quite a lot.
    
    Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
    mhofstetter committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    63f632b View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2023

  1. fqdn proxy: add transparent socket options to IPFamily struct

    This commit adds the transparent socket options to the IPFamily
    struct. This way it can be used in the respective functions.
    
    Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
    mhofstetter committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    cd014c8 View commit details
    Browse the repository at this point in the history