diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-09-23 18:12:37 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-09-23 18:12:37 +0200 |
commit | 6360f319362fd13c86c3387a4bac57665d5ecd73 (patch) | |
tree | ef6b98cd0893dfbf7a53c2807d59db1a34dde10d /src/sync-mode.c | |
parent | 90bbd8b34565ff5106dde34e0798c5e33fb4b786 (diff) | |
download | conntrack-tools-6360f319362fd13c86c3387a4bac57665d5ecd73.tar.gz conntrack-tools-6360f319362fd13c86c3387a4bac57665d5ecd73.zip |
conntrackd: add retention queue for TCP errors
Under stress, the TCP stack may return EAGAIN if there is not
space left in the sender buffer. We also enqueue any other
error.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/sync-mode.c')
-rw-r--r-- | src/sync-mode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sync-mode.c b/src/sync-mode.c index 6781f10..63fae68 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -295,7 +295,8 @@ static int init_sync(void) if (STATE_SYNC(external)->init() == -1) return -1; - channel_init(); + if (channel_init() == -1) + return -1; /* channel to send events on the wire */ STATE_SYNC(channel) = @@ -397,6 +398,8 @@ static void kill_sync(void) queue_destroy(STATE_SYNC(tx_queue)); + channel_end(); + origin_unregister(STATE_SYNC(commit).h); nfct_close(STATE_SYNC(commit).h); destroy_evfd(STATE_SYNC(commit).evfd); |