Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for wantIpv6 (0.17 sec)

  1. pkg/proxy/util/utils_test.go

    		ipString        []string
    		wantIPv6        bool
    		expectCorrect   []string
    		expectIncorrect []string
    	}{
    		{
    			desc:            "empty input IPv4",
    			ipString:        []string{},
    			wantIPv6:        false,
    			expectCorrect:   nil,
    			expectIncorrect: nil,
    		},
    		{
    			desc:            "empty input IPv6",
    			ipString:        []string{},
    			wantIPv6:        true,
    			expectCorrect:   nil,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 11:57:43 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  2. pkg/util/net/ip_test.go

    			}
    			if !reflect.DeepEqual(gotIpv6, tt.wantIpv6) {
    				t.Errorf("IPsSplitV4V6() gotIpv6 = %v, want %v", gotIpv6, tt.wantIpv6)
    			}
    		})
    	}
    }
    
    func TestParseIPsSplitToV4V61(t *testing.T) {
    	type args struct {
    		ips []string
    	}
    	tests := []struct {
    		name     string
    		args     args
    		wantIpv4 []netip.Addr
    		wantIpv6 []netip.Addr
    	}{
    		{
    			name: "test correctly parse ipv4 and ipv6 addresses",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 01 14:41:40 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/server/config_selfclient.go

    func getLoopbackAddress(wantIPv6 bool) string {
    	addrs, err := net.InterfaceAddrs()
    	if err == nil {
    		for _, address := range addrs {
    			if ipnet, ok := address.(*net.IPNet); ok && ipnet.IP.IsLoopback() && wantIPv6 == netutils.IsIPv6(ipnet.IP) {
    				return ipnet.IP.String()
    			}
    		}
    	}
    	return "localhost"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 23 00:06:34 UTC 2021
    - 3.1K bytes
    - Viewed (0)
  4. src/net/net_windows_test.go

    					have = append(have, addr.IP.String())
    				}
    			}
    		}
    		slices.Sort(have)
    
    		want := netshInterfaceIPv4ShowAddress(ifi.Name, outIPV4)
    		wantIPv6 := netshInterfaceIPv6ShowAddress(ifi.Name, outIPV6)
    		want = append(want, wantIPv6...)
    		slices.Sort(want)
    
    		if strings.Join(want, "/") != strings.Join(have, "/") {
    			t.Errorf("%s: unexpected addresses list %q, want %q", ifi.Name, have, want)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  5. pkg/proxy/ipvs/proxier.go

    	proxier.gracefuldeleteManager.Run()
    	return proxier, nil
    }
    
    func filterCIDRs(wantIPv6 bool, cidrs []string) []string {
    	var filteredCIDRs []string
    	for _, cidr := range cidrs {
    		if netutils.IsIPv6CIDRString(cidr) == wantIPv6 {
    			filteredCIDRs = append(filteredCIDRs, cidr)
    		}
    	}
    	return filteredCIDRs
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Apr 28 15:51:23 UTC 2024
    - 77.7K bytes
    - Viewed (0)
Back to top