Snort mailing list archives
[DAQ][PATCH 2/3] nfq: fix _acquire return value on select EINTR error
From: Florian Westphal <fwestphal () astaro com>
Date: Tue, 3 Aug 2010 12:49:31 +0200
snort will exit when DAQ_Acquire() signals an error. snorts PacketLoop() will check for pending signals when DAQ_Acquire returns zero, which is exactly what we should do upon EINTR. --- os-daq-modules/daq_nfq.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/os-daq-modules/daq_nfq.c b/os-daq-modules/daq_nfq.c index 2a0360b..2c033d4 100644 --- a/os-daq-modules/daq_nfq.c +++ b/os-daq-modules/daq_nfq.c @@ -447,8 +447,9 @@ static int nfq_daq_acquire ( // at least ipq had a timeout! if ( select(impl->sock+1, &fdset, NULL, NULL, &tv) < 0 ) { - if ( errno != EINTR ) - DPE(impl->error, "%s: select = %s", + if ( errno == EINTR ) + break; + DPE(impl->error, "%s: select = %s", __FUNCTION__, strerror(errno)); return DAQ_ERROR; } -- 1.7.1 ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Snort-devel mailing list Snort-devel () lists sourceforge net https://lists.sourceforge.net/lists/listinfo/snort-devel
Current thread:
- [DAQ][PATCH 1/3] fix --enable-xyz-module options Florian Westphal (Aug 03)
- [DAQ][PATCH 3/3] nfq: add "queuelen" option to set nfqueue length Florian Westphal (Aug 03)
- Re: [DAQ][PATCH 3/3] nfq: add "queuelen" option to set nfqueue length Russ Combs (Aug 09)
- [DAQ][PATCH 2/3] nfq: fix _acquire return value on select EINTR error Florian Westphal (Aug 03)
- Re: [DAQ][PATCH 2/3] nfq: fix _acquire return value on select EINTR error Russ Combs (Aug 09)
- Re: [DAQ][PATCH 1/3] fix --enable-xyz-module options Russ Combs (Aug 03)
- Re: [DAQ][PATCH 1/3] fix --enable-xyz-module options Florian Westphal (Aug 03)
- Re: [DAQ][PATCH 1/3] fix --enable-xyz-module options Will Metcalf (Aug 03)
- Re: [DAQ][PATCH 1/3] fix --enable-xyz-module options Russ Combs (Aug 03)
- Re: [DAQ][PATCH 1/3] fix --enable-xyz-module options Florian Westphal (Aug 03)
- Re: [DAQ][PATCH 1/3] fix --enable-xyz-module options Russ Combs (Aug 09)
- [DAQ][PATCH 3/3] nfq: add "queuelen" option to set nfqueue length Florian Westphal (Aug 03)
- Re: [DAQ][PATCH 1/3] fix --enable-xyz-module options Michael Altizer (Aug 03)