Index: sys/net/bpf.c =================================================================== RCS file: /cvs/src/sys/net/bpf.c,v diff -u -p -r1.222 bpf.c --- sys/net/bpf.c 26 Jan 2024 21:14:08 -0000 1.222 +++ sys/net/bpf.c 2 Aug 2024 13:11:11 -0000 @@ -731,6 +731,8 @@ bpf_set_wtimeout(struct bpf_d *d, const return (EINVAL); nsec = TIMEVAL_TO_NSEC(tv); + if (nsec > SEC_TO_NSEC(300)) + return (EINVAL); if (nsec > MAXTSLP) return (EOVERFLOW); Index: share/man/man4/bpf.4 =================================================================== RCS file: /cvs/src/share/man/man4/bpf.4,v diff -u -p -r1.45 bpf.4 --- share/man/man4/bpf.4 9 Mar 2023 06:01:40 -0000 1.45 +++ share/man/man4/bpf.4 2 Aug 2024 13:11:11 -0000 @@ -315,6 +315,7 @@ the kernel buffer becoming readable. By default, or when reset, the wait timeout is infinite, meaning the age of packets in the kernel buffer does not make the buffer readable. +The maximum wait time that can be set is 5 minutes (300 seconds). .Pp .It Dv BIOCSETF Fa "struct bpf_program *" Sets the filter program used by the kernel to discard uninteresting packets.