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 /include | |
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 'include')
-rw-r--r-- | include/channel.h | 6 | ||||
-rw-r--r-- | include/conntrackd.h | 3 | ||||
-rw-r--r-- | include/queue.h | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/include/channel.h b/include/channel.h index d06e510..9b5fad8 100644 --- a/include/channel.h +++ b/include/channel.h @@ -34,7 +34,8 @@ struct tcp_channel { #define CHANNEL_F_DEFAULT (1 << 0) #define CHANNEL_F_BUFFERED (1 << 1) #define CHANNEL_F_STREAM (1 << 2) -#define CHANNEL_F_MAX (1 << 3) +#define CHANNEL_F_ERRORS (1 << 3) +#define CHANNEL_F_MAX (1 << 4) union channel_type_conf { struct mcast_conf mcast; @@ -78,7 +79,8 @@ struct channel { void *data; }; -void channel_init(void); +int channel_init(void); +void channel_end(void); struct channel *channel_open(struct channel_conf *conf); void channel_close(struct channel *c); diff --git a/include/conntrackd.h b/include/conntrackd.h index ce8f9d4..7737532 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -96,6 +96,9 @@ struct ct_conf { int filter_from_kernelspace; int event_iterations_limit; struct { + int error_queue_length; + } channelc; + struct { int external_cache_disable; } sync; struct { diff --git a/include/queue.h b/include/queue.h index cca9cba..188e106 100644 --- a/include/queue.h +++ b/include/queue.h @@ -13,7 +13,8 @@ struct queue_node { enum { Q_ELEM_OBJ = 0, - Q_ELEM_CTL = 1 + Q_ELEM_CTL = 1, + Q_ELEM_ERR = 2, }; void queue_node_init(struct queue_node *n, int type); |