All of lore.kernel.org
 help / color / mirror / Atom feed
From: netfilter@interlinx.bc.ca
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] Amanda conntrack/nat module update
Date: Fri, 1 Nov 2002 18:23:37 -0500	[thread overview]
Message-ID: <20021101232337.GD16306@pc.ilinx> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1239 bytes --]

Hello Harald and friends,

Please find attached an update patch to patch-o-matic for my Amanda
protocol conntrack/nat helper.  This patch corrects a minor error in
the Config.in indentation as well as, and more importantly, lengthens
the timeout for the master Amanda connection from the default UDP
stream timeout (normally 180 seconds) to 300 seconds.

This is required, because the Amanda server can tell the client to go
off and do some work (i.e. estimate the size of backups at various
incremental levels) and while the client is doing the work, no
communication will occur.  It is not uncommon for a client to take in
excess of 180 seconds to do the estimates.  Indeed, on my network
here, the value of 300 seconds is sufficient while 180 is not.

Additionally, this value can be tuned at module load time with a
module parameter, "master_timeout".

I would be most appreciative if you could apply this patch to
patch-o-matic at your earliest convenience.

In case anyone is interested, this patch implements a solution to my
question in this (incorrectly subjected) mailing list posting:

http://lists.netfilter.org/pipermail/netfilter-devel/2002-October/009676.html

Thanx,
b.

-- 
Brian J. Murrell

[-- Attachment #1.2: amanda-pom.patch --]
[-- Type: text/plain, Size: 3595 bytes --]

Index: extra/amanda-conntrack-nat.patch
===================================================================
RCS file: /cvspublic/netfilter/patch-o-matic/extra/amanda-conntrack-nat.patch,v
retrieving revision 1.1
diff -u -r1.1 amanda-conntrack-nat.patch
--- extra/amanda-conntrack-nat.patch	15 Sep 2002 11:37:15 -0000	1.1
+++ extra/amanda-conntrack-nat.patch	1 Nov 2002 23:21:06 -0000
@@ -34,10 +34,10 @@
 diff -uNr linux-2.4.18-6mdk-pom-clean/net/ipv4/netfilter/ip_conntrack_amanda.c linux-2.4.18-6mdkuml-48um-pom/net/ipv4/netfilter/ip_conntrack_amanda.c
 --- linux-2.4.18-6mdk-pom-clean/net/ipv4/netfilter/ip_conntrack_amanda.c	1969-12-31 19:00:00.000000000 -0500
 +++ linux-2.4.18-6mdkuml-48um-pom/net/ipv4/netfilter/ip_conntrack_amanda.c	2002-08-16 04:24:25.000000000 -0400
-@@ -0,0 +1,219 @@
-+/* Amanda extension for IP connection tracking, Version 0.1
+@@ -0,0 +1,233 @@
++/* Amanda extension for IP connection tracking, Version 0.2
 + * (C) 2002 by Brian J. Murrell <netfilter@interlinx.bc.ca>
-+ * based on HW's ip_conntrack_irc.c	as well as other modules
++ * based on HW's ip_conntrack_irc.c as well as other modules
 + *
 + *      This program is free software; you can redistribute it and/or
 + *      modify it under the terms of the GNU General Public License
@@ -45,7 +45,13 @@
 + *      2 of the License, or (at your option) any later version.
 + *
 + *	Module load syntax:
-+ * 	insmod ip_conntrack_amanda.o
++ * 	insmod ip_conntrack_amanda.o [master_timeout=n]
++ *	
++ *	Where master_timeout is the timeout (in seconds) of the master
++ *	connection (port 10080).  This defaults to 5 minutes but if
++ *	your clients take longer than 5 minutes to do their work
++ *	before getting back to the Amanda server, you can increase
++ *	this value.
 + *
 + */
 +
@@ -59,9 +65,13 @@
 +#include <linux/netfilter_ipv4/ip_conntrack_helper.h>
 +#include <linux/netfilter_ipv4/ip_conntrack_amanda.h>
 +
++static unsigned int master_timeout = 300;
++
 +MODULE_AUTHOR("Brian J. Murrell <netfilter@interlinx.bc.ca>");
 +MODULE_DESCRIPTION("Amanda connection tracking module");
 +MODULE_LICENSE("GPL");
++MODULE_PARM(master_timeout, "i");
++MODULE_PARM_DESC(master_timeout, "timeout for the master connection");
 +
 +DECLARE_LOCK(ip_amanda_lock);
 +struct module *ip_conntrack_amanda = THIS_MODULE;
@@ -97,6 +107,10 @@
 +	/* Can't track connections formed before we registered */
 +	if (!info)
 +		return NF_ACCEPT;
++
++	/* increase the UDP timeout of the master connection as replies from
++	 * Amanda clients to the server can be quite delayed */
++	ip_ct_refresh(ct, master_timeout * HZ);
 +
 +	/* If packet is coming from Amanda server */
 +	if (dir == IP_CT_DIR_ORIGINAL)
Index: extra/amanda-conntrack-nat.patch.config.in-2
===================================================================
RCS file: /cvspublic/netfilter/patch-o-matic/extra/amanda-conntrack-nat.patch.config.in-2,v
retrieving revision 1.1
diff -u -r1.1 amanda-conntrack-nat.patch.config.in-2
--- extra/amanda-conntrack-nat.patch.config.in-2	15 Sep 2002 11:37:15 -0000	1.1
+++ extra/amanda-conntrack-nat.patch.config.in-2	1 Nov 2002 23:21:06 -0000
@@ -1,6 +1,6 @@
       dep_tristate '    REDIRECT target support' CONFIG_IP_NF_TARGET_REDIRECT $CONFIG_IP_NF_NAT
       if [ "$CONFIG_IP_NF_AMANDA" = "m" ]; then
-       define_tristate CONFIG_IP_NF_NAT_AMANDA m
+        define_tristate CONFIG_IP_NF_NAT_AMANDA m
       else
         if [ "$CONFIG_IP_NF_AMANDA" = "y" ]; then
           define_tristate CONFIG_IP_NF_NAT_AMANDA $CONFIG_IP_NF_NAT

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2002-11-01 23:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-01 23:23 netfilter [this message]
2002-11-02 13:45 ` [PATCH] Amanda conntrack/nat module update Martin Josefsson
2002-11-02 14:35   ` netfilter
2002-11-02 18:04   ` Harald Welte
2002-11-02 14:27 ` Harald Welte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021101232337.GD16306@pc.ilinx \
    --to=netfilter@interlinx.bc.ca \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.