]> The Tcpdump Group git mirrors - libpcap/commitdiff
Don't use internal routines.
authorGuy Harris <[email protected]>
Sat, 1 Sep 2018 03:18:42 +0000 (20:18 -0700)
committerGuy Harris <[email protected]>
Sat, 1 Sep 2018 03:18:42 +0000 (20:18 -0700)
The semi-automated conversion of bpf_validate() to
pcap_validate_filter() shouldn't have been done to the test programs.

testprogs/filtertest.c

index 4fcf3ff0180b440b8e06ba0e2b7702d862873932..7e2d6d6e186d4989f4c694c5a0f7bf5d4f99eb0c 100644 (file)
@@ -318,7 +318,7 @@ main(int argc, char **argv)
                error("%s", pcap_geterr(pd));
 
        have_fcode = 1;
-       if (!pcap_validate_filter(fcode.bf_insns, fcode.bf_len))
+       if (!bpf_validate(fcode.bf_insns, fcode.bf_len))
                warn("Filter doesn't pass validation");
 
 #ifdef BDEBUG