]> The Tcpdump Group git mirrors - libpcap/commitdiff
bpf: fix error check.
authorGuy Harris <[email protected]>
Tue, 15 Mar 2022 02:13:16 +0000 (19:13 -0700)
committerGuy Harris <[email protected]>
Wed, 16 Mar 2022 05:36:16 +0000 (22:36 -0700)
The status of the bpf_bind() call, which is what might equal
BPF_BIND_BUFFER_TOO_BIG, is in status, not errno.

(cherry picked from commit b9428e2c4bcb4d8509a65b6fc9a4cb2ab23f3d1e)

pcap-bpf.c

index 7a0c2ffebaecb3c0445130496af05f577b1795d4..d82ecd058b7b2dcc9ff6f727169a2dbd52dd1281 100644 (file)
@@ -2200,7 +2200,7 @@ pcap_activate_bpf(pcap_t *p)
                                 *
                                 * Otherwise, fail.
                                 */
-                               if (errno != BPF_BIND_BUFFER_TOO_BIG) {
+                               if (status != BPF_BIND_BUFFER_TOO_BIG) {
                                        /*
                                         * Special checks on macOS to deal
                                         * with the way monitor mode was