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

[action] [PR:13516] Clear DNS configuration received from DHCP during networking reconfiguration in Linux. #13686

Merged
merged 1 commit into from
Feb 16, 2023

Commits on Feb 6, 2023

  1. Clear DNS configuration received from DHCP during networking reconfig…

    …uration in Linux. (sonic-net#13516)
    
    - Why I did it
    fixes sonic-net#12907
    
    When the management interface IP address configuration changes from dynamic to static the DNS configuration (retrieved from the DHCP server) in /etc/resolv.conf remains uncleared. This leads to a DNS configuration pointing to the wrong nameserver. To make the behavior clear DNS configuration received from DHCP should be cleared.
    
    - How I did it
    Use resolvconf package for managing DNS configuration. It is capable of tracking the source of DNS configuration and puts the configuration retrieved from the DHCP servers into a separate file. This allows the implementation of DNS configuration cleanup retrieved from DHCP during networking reconfiguration.
    
    - How to verify it
    Ensure that the management interface has no static configuration.
    Check that /etc/resolv.conf has DNS configuration.
    Configure a static IP address on the management interface.
    Verify that /etc/resolv.conf has no DNS configuration.
    Remove the static IP address from the management interface.
    Verify that /etc/resolv.conf has DNS configuration retrieved form DHCP server.
    oleksandrivantsiv authored and mssonicbld committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    1dfb489 View commit details
    Browse the repository at this point in the history