22 lines
477 B
Diff
22 lines
477 B
Diff
|
--- pcap-linux.c
|
||
|
+++ pcap-linux.c
|
||
|
@@ -1060,6 +1060,9 @@
|
||
|
struct sock_fprog fcode;
|
||
|
int can_filter_in_kernel;
|
||
|
int err = 0;
|
||
|
+ memset(&fcode, 0, sizeof(fcode));
|
||
|
+ fcode.len = 0;
|
||
|
+ fcode.filter = NULL;
|
||
|
#endif
|
||
|
|
||
|
if (!handle)
|
||
|
@@ -1094,8 +1097,6 @@
|
||
|
* sake of correctness I added this check.
|
||
|
*/
|
||
|
fprintf(stderr, "Warning: Filter too complex for kernel\n");
|
||
|
- fcode.len = 0;
|
||
|
- fcode.filter = NULL;
|
||
|
can_filter_in_kernel = 0;
|
||
|
} else
|
||
|
#endif /* USHRT_MAX */
|