- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for ipp (0.02 sec)
-
tools/istio-iptables/pkg/config/validation.go
return nil } func ValidateIPv4LoopbackCidr(cidr string) error { ipp, err := netip.ParsePrefix(cidr) if err != nil { return fmt.Errorf("failed to parse CIDR %s: %v", cidr, err) } if !ipp.Addr().Is4() || !ipp.Addr().IsLoopback() { return fmt.Errorf("expected valid IPv4 loopback address in CIDR %s; found %v", cidr, ipp.Addr()) } ones := ipp.Bits() if ones < 8 || ones > 32 {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jan 11 02:38:28 UTC 2024 - 2K bytes - Viewed (0) -
test/convT2X.go
if z != iz { panic("z != iz") } if z != jz { panic("z != jz") } if p != ip { panic("p != ip") } if p != jp { panic("p != jp") } if pp != ipp { panic("pp != ipp") } // pp does not implement J. // Test that non-interface types can be used as ...interface{} arguments. if got := second(z, p, pp, u16, u32, u64, u128, f32, f64, c128, s, b, m, c); got != ip {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jul 02 23:09:05 UTC 2012 - 3.3K bytes - Viewed (0) -
src/net/netip/netip_pkg_test.go
} for _, tt := range tests { got := tt.ipp.IsValid() if got != tt.want { t.Errorf("(%v).IsValid() = %v want %v", tt.ipp, got, tt.want) } // Test that there is only one invalid Prefix representation per Addr. invalid := PrefixFrom(tt.ipp.Addr(), -1) if !got && tt.ipp != invalid { t.Errorf("(%v == %v) = false, want true", tt.ipp, invalid) } } } var nextPrevTests = []struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 02 15:37:19 UTC 2023 - 9K bytes - Viewed (0) -
src/net/netip/fuzz_test.go
checkStringParseRoundTrip(t, port, ParseAddrPort) checkEncoding(t, port) ipp, err := ParsePrefix(s) if err == nil { checkStringParseRoundTrip(t, ipp, ParsePrefix) checkEncoding(t, ipp) } ipp = PrefixFrom(ip, 8) checkStringParseRoundTrip(t, ipp, ParsePrefix) checkEncoding(t, ipp) }) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 20 23:46:23 UTC 2021 - 10.5K bytes - Viewed (0) -
src/net/netip/netip_test.go
tests := []struct { ipp Prefix want bool }{ {ipp: mustPrefix("127.0.0.1/32"), want: true}, {ipp: mustPrefix("127.0.0.1/31"), want: false}, {ipp: mustPrefix("127.0.0.1/0"), want: false}, {ipp: mustPrefix("::1/128"), want: true}, {ipp: mustPrefix("::1/127"), want: false}, {ipp: mustPrefix("::1/0"), want: false}, {ipp: Prefix{}, want: false}, }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 17:10:01 UTC 2024 - 54.3K bytes - Viewed (0) -
security/pkg/server/ca/authenticate/xfcc_authenticator.go
// Always trust local host addresses. return netip.MustParseAddr(ip).IsLoopback() } func isInRange(addr, cidr string) bool { if strings.Contains(cidr, "/") { ipp, err := netip.ParsePrefix(cidr) if err != nil { return false } return ipp.Contains(netip.MustParseAddr(addr)) } return false
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 08 17:05:56 UTC 2024 - 3K bytes - Viewed (0) -
tools/istio-iptables/pkg/capture/run.go
for _, ipRange := range split(cidrList) { ipp, err := netip.ParsePrefix(ipRange) if err != nil { _, err = fmt.Fprintf(os.Stderr, "Ignoring error for bug compatibility with istio-iptables: %s\n", err.Error()) if err != nil { return ipv4Ranges, ipv6Ranges, err } continue } if ipp.Addr().Is4() { ipv4Ranges.CIDRs = append(ipv4Ranges.CIDRs, ipp) if ipp.Addr().IsLoopback() { ipv4Ranges.HasLoopBackIP = true
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 06 03:53:23 UTC 2024 - 35.4K bytes - Viewed (0) -
tools/istio-iptables/pkg/capture/run_test.go
} } func TestSeparateV4V6(t *testing.T) { mkIPList := func(ips ...string) []netip.Prefix { ret := []netip.Prefix{} for _, ip := range ips { ipp, err := netip.ParsePrefix(ip) if err != nil { panic(err.Error()) } ret = append(ret, ipp) } return ret } cases := []struct { name string cidr string v4 NetworkRange v6 NetworkRange }{ {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 30 22:24:38 UTC 2024 - 8.1K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/ambient/authorization.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 15 16:23:36 UTC 2024 - 18.4K bytes - Viewed (0) -
src/net/netip/netip.go
func ParseAddrPort(s string) (AddrPort, error) { var ipp AddrPort ip, port, v6, err := splitAddrPort(s) if err != nil { return ipp, err } port16, err := strconv.ParseUint(port, 10, 16) if err != nil { return ipp, errors.New("invalid port " + strconv.Quote(port) + " parsing " + strconv.Quote(s)) } ipp.port = uint16(port16) ipp.ip, err = ParseAddr(ip) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 17:10:01 UTC 2024 - 43.2K bytes - Viewed (0)