]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-null.c
When attaching a "bpf_program" to a "pcap_t" to use as a userland
[libpcap] / pcap-null.c
index 588c4d320a3c3c5a39ea1830cbe9ec63171854cb..e952c98824a72767177aa65060be3348ded113bd 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap-null.c,v 1.12 2000-07-11 00:37:06 assar Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/pcap-null.c,v 1.13 2000-10-28 00:01:29 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -68,6 +68,7 @@ pcap_setfilter(pcap_t *p, struct bpf_program *fp)
                    "pcap_setfilter: %s", nosup);
                return (-1);
        }
-       p->fcode = *fp;
+       if (install_bpf_program(p, fp) < 0)
+               return (-1);
        return (0);
 }