(cidrRange *v3corepb.CidrRange)
| 361 | } |
| 362 | |
| 363 | func newLocalIPMatcher(cidrRange *v3corepb.CidrRange) (*localIPMatcher, error) { |
| 364 | cidrRangeString := fmt.Sprintf("%s/%d", cidrRange.AddressPrefix, cidrRange.PrefixLen.Value) |
| 365 | ipNet, err := netip.ParsePrefix(cidrRangeString) |
| 366 | if err != nil { |
| 367 | return nil, err |
| 368 | } |
| 369 | return &localIPMatcher{ipNet: ipNet.Masked()}, nil |
| 370 | } |
| 371 | |
| 372 | func (dim *localIPMatcher) match(data *rpcData) bool { |
| 373 | host, _, err := net.SplitHostPort(data.localAddr.String()) |
no outgoing calls
no test coverage detected