Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for IsZeroCIDR (0.15 sec)

  1. pkg/proxy/util/utils.go

    // isValidEndpoint checks that the given host / port pair are valid endpoint
    func isValidEndpoint(host string, port int) bool {
    	return host != "" && port > 0
    }
    
    // IsZeroCIDR checks whether the input CIDR string is either
    // the IPv4 or IPv6 zero CIDR
    func IsZeroCIDR(cidr string) bool {
    	if cidr == IPv4ZeroCIDR || cidr == IPv6ZeroCIDR {
    		return true
    	}
    	return false
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 11:57:43 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  2. pkg/proxy/util/nodeport_addresses.go

    		_, cidr, _ := netutils.ParseCIDRSloppy(str)
    
    		if netutils.IsIPv4CIDR(cidr) {
    			if cidr.IP.IsLoopback() || cidr.Contains(ipv4LoopbackStart) {
    				npa.containsIPv4Loopback = true
    			}
    		}
    
    		if IsZeroCIDR(str) {
    			// Ignore everything else
    			npa.cidrs = []*net.IPNet{cidr}
    			npa.matchAll = true
    			break
    		}
    
    		npa.cidrs = append(npa.cidrs, cidr)
    	}
    
    	return npa
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 13:25:06 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  3. pkg/proxy/util/utils_test.go

    		{
    			name:     "ipv6 zero cidr",
    			input:    IPv6ZeroCIDR,
    			expected: true,
    		},
    	}
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			if got := IsZeroCIDR(tc.input); tc.expected != got {
    				t.Errorf("IsZeroCIDR() = %t, want %t", got, tc.expected)
    			}
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 11:57:43 UTC 2024
    - 17.1K bytes
    - Viewed (0)
Back to top