On Sat, Feb 14, 2009 at 21:08, Martín Ferrari <tin...@debian.org> wrote: > Meanwhile this is solved, see the attached patch that's useful as a > workaround for fwknopd
My bad, that patch didn't work. It goes again, this time correctly tested :) -- Martín Ferrari
--- /home/martin/src/fwknop-1.9.10/fwknopd 2009-01-13 02:26:24.000000000 -0200 +++ ./fwknopd 2009-02-14 21:30:16.000000000 -0200 @@ -359,7 +359,16 @@ for (;;) { - Net::Pcap::loop($pcap_t, 1, \&pcap_process_pkt, 'fwknop_tag'); + my @tmpcbargs; my $cbcalled = 0; + my $tmpcb = sub { + my $tag = $_[0]; + my %hdr = %{$_[1]}; + my $pkt = $_[2]; + @tmpcbargs = ($tag, \%hdr, $pkt); + $cbcalled = 1; + }; + Net::Pcap::loop($pcap_t, 1, $tmpcb, 'fwknop_tag'); + pcap_process_pkt(@tmpcbargs) if($cbcalled); if ($config{'AUTH_MODE'} eq 'FILE_PCAP' or $config{'AUTH_MODE'} eq 'ULOG_PCAP') {