Change #275720
| Category | libpcap |
| Changed by | Guy Harris <gharris@sonic.net> |
| Changed at | Fri 24 Jul 2026 21:52:46 |
| Repository | https://git.tcpdump.org/libpcap |
| Project | libpcap |
| Branch | master |
| Revision | 22888fa7f469219c35710c22b52571e403eaf83e |
Comments
pcap-bpf: have device_exists() own the socket descriptor. That means that its caller doesn't need to open and close the descriptor itself. Also, treat a failure to open the socket as an error to be reported as such, treat an error from SIOCGIFFLAGS *other* than "there is no such device" as implying that there *is* such a device, and treat a failure to allocate a string to hold the name of the device to test as an error to be reported as such. (This code is currently used only on old versions of macOS - "old" as in "Mac OS X Tiger", which came out over 25 years ago - but it'll be useful for fixing the "report 'no such device', not 'permission denied', if the user doesn't have permission to capture on any device and the device doesn't exist" issue.)
Changed files
- pcap-bpf.c