ipv4, ipv6: avoid slice bounds panics on empty batch or BPF filter Return 0, nil from ReadBatch and WriteBatch when ms is empty on non-Linux platforms (matching the Linux behavior), and return an error from SetBPF when the filter slice is empty or exceeds MaxUint16 instructions. Change-Id: I8863524004aad5a6bc5f967f02e529866a6a6964 Reviewed-on: https://go-review.googlesource.com/c/net/+/852829 Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Chase <drchase@google.com>
This repository holds supplementary Go networking packages.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/net.
The main issue tracker for the net repository is located at https://go.dev/issues. Prefix your issue with “x/net:” in the subject line, so it is easy to find.