]> The Tcpdump Group git mirrors - libpcap/commitdiff
Do we *really* need to validate filters in rpcapd?
authorGuy Harris <[email protected]>
Thu, 30 Aug 2018 21:37:21 +0000 (14:37 -0700)
committerGuy Harris <[email protected]>
Thu, 30 Aug 2018 21:37:21 +0000 (14:37 -0700)
rpcapd/daemon.c

index 85aa0f983565bf3d6ede2683cb689e8ad96ab1e9..e7cef199b2e890db80ed50aea8b0e921f745adb1 100644 (file)
@@ -2020,6 +2020,9 @@ daemon_unpackapplyfilter(SOCKET sockctrl_in, struct session *session, uint32 *pl
                bf_insn++;
        }
 
+       //
+       // XXX - pcap_setfilter() should do the validation for us.
+       //
        if (bpf_validate(bf_prog.bf_insns, bf_prog.bf_len) == 0)
        {
                pcap_snprintf(errmsgbuf, PCAP_ERRBUF_SIZE, "The filter contains bogus instructions");