Skip to content

Commit

Permalink
Add mgmt subnet to no_proxy if not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
toweber committed Dec 19, 2024
1 parent 5d7a870 commit e8f98e8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions clab/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,12 @@ func (c *CLab) createNodeCfg(nodeName string, nodeDef *types.NodeDefinition, idx
}

// add mgmt subnet range for the sake of completeness - some OS support it, others don't
noProxyList = append(noProxyList, c.Config.Mgmt.IPv4Subnet)
noProxyList = append(noProxyList, c.Config.Mgmt.IPv6Subnet)
if c.Config.Mgmt.IPv4Subnet != "" {
noProxyList = append(noProxyList, c.Config.Mgmt.IPv4Subnet)
}
if c.Config.Mgmt.IPv6Subnet != "" {
noProxyList = append(noProxyList, c.Config.Mgmt.IPv6Subnet)
}

// sort for better readability
sort.Strings(noProxyList)
Expand Down

0 comments on commit e8f98e8

Please sign in to comment.