Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for cidrStrings (0.27 sec)

  1. pkg/proxy/util/nodeport_addresses.go

    func NewNodePortAddresses(family v1.IPFamily, cidrStrings []string) *NodePortAddresses {
    	npa := &NodePortAddresses{}
    
    	// Filter CIDRs to correct family
    	for _, str := range cidrStrings {
    		if (family == v1.IPv4Protocol) == netutils.IsIPv4CIDRString(str) {
    			npa.cidrStrings = append(npa.cidrStrings, str)
    		}
    	}
    	if len(npa.cidrStrings) == 0 {
    		if family == v1.IPv4Protocol {
    			npa.cidrStrings = []string{IPv4ZeroCIDR}
    		} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 13:25:06 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. pkg/proxy/util/utils.go

    		}
    	}
    	return ipFamilyMap
    }
    
    // MapCIDRsByIPFamily maps a slice of CIDRs to their respective IP families (v4 or v6)
    func MapCIDRsByIPFamily(cidrsStrings []string) map[v1.IPFamily][]*net.IPNet {
    	ipFamilyMap := map[v1.IPFamily][]*net.IPNet{}
    	for _, cidrStrUntrimmed := range cidrsStrings {
    		cidrStr := strings.TrimSpace(cidrStrUntrimmed)
    		_, cidr, err := netutils.ParseCIDRSloppy(cidrStr)
    		if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 11:57:43 UTC 2024
    - 7.4K bytes
    - Viewed (0)
Back to top