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

pkg/ipam: convert dots to slashes in interface names for sysctl #585

Merged
merged 1 commit into from
Feb 24, 2021

Commits on Feb 22, 2021

  1. pkg/ipam: use slash as sysctl separator so interface name can have dot

    A dot is a valid character in interface names and is often used in the
    names of VLAN interfaces. The sysctl net.ipv6.conf.<ifname>.disable_ipv6
    key path cannot use dots both in the ifname and as path separator.
    We switch to using / as key path separator so dots are allowed in the
    ifname.
    
    This works because sysctl.Sysctl() accepts key paths with either dots
    or slashes as separators.
    
    Also, print error message to stderr in case sysctl cannot be read
    instead of silently hiding the error.
    
    Signed-off-by: David Verbeiren <[email protected]>
    dverbeir committed Feb 22, 2021
    Configuration menu
    Copy the full SHA
    9b09f16 View commit details
    Browse the repository at this point in the history