From 6360f319362fd13c86c3387a4bac57665d5ecd73 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 23 Sep 2009 18:12:37 +0200 Subject: 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 --- src/sync-mode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/sync-mode.c') 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); -- cgit v1.2.3