Subject: | Fix parsing of multiple files |
As discussed here: http://www.cpanforum.com/dist/Net-LibNIDS and also
experienced by me, Net::LibNIDS does not handle multiple pcap files
correctly.
This is because libnids cleans up and removes its callback once run() is
finished. Net::LibNIDS will only set a new callback if the local one is
undefined, which means libnids runs with no callback set.
The attached patch fixes this, by removing the check and always setting
the local and libnids callbacks when Net::LibNIDS::tcp_callback() is called.
Subject: | net-libnids-callback.patch |
--- LibNIDS.xs-old 2009-11-04 15:50:41.049142523 +0000
+++ LibNIDS.xs 2009-11-04 15:50:23.239700506 +0000
@@ -291,11 +291,8 @@
tcp_callback(cb);
SV* cb
CODE:
- if(!our_tcp_callback) {
our_tcp_callback = SvRV(cb);
nids_register_tcp(tcp_callback_f);
- }
-
MODULE = Net::LibNIDS PACKAGE = Net::LibNIDS::param