Allow the BPF to be select for EVFILT_WRITE with kqueue. This is required for Boost asio to be able to use a BPF file descriptor even if it is used only for reading. Asio insists on installing a write filter.
Details
Details
- Reviewers
ae - Group Reviewers
network manpages - Commits
- rGded77e0237a8: Allow the BPF to be select for write. This is needed for boost:asio
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/net/bpf.c | ||
---|---|---|
2193 | I'd prefer a bit less code duplication: struct filterops *ops; ... switch (kn->kn_filter) { case EVFILT_READ: ops = &bpfread_filtops; break; case EVFILT_WRITE: ops = &bpwrite_filtops; break; default: return (EINVAL); } ... Also it seems you need to modify kqueue(2). |