From: philipc@snapgear.com
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH 1/4] TCPMSS: dont drop packets
Date: Wed, 24 May 2006 14:04:42 +1000 [thread overview]
Message-ID: <20060524040950.838105000@snapgear.com> (raw)
In-Reply-To: 20060524040441.111049000@snapgear.com
[-- Attachment #1: tcpmssdrop.patch --]
[-- Type: text/plain, Size: 2093 bytes --]
MSS clamping should be best effort, since we are doing the clamping
to avoid dropped packets. If we can't clamp, then forward it anyway
and hope PMTU discovery works.
The test case that caused problems was syn packet containing data.
Related questions:
This patch changes the behaviour when setting the MSS too, is this
acceptable?
Should skb_make_writable() and skb_checksum_help() cause dropped packets
if they fail?
Which mangle targets should drop packets if they fail?
MARK should, since the mark may be used in filter rules.
What about DSCP, ECN, TOS, TTL?
Signed-off-by: Philip Craig <philipc@snapgear.com>
Index: linux-2.6.17-rc4.orig/net/ipv4/netfilter/ipt_TCPMSS.c
===================================================================
--- linux-2.6.17-rc4.orig.orig/net/ipv4/netfilter/ipt_TCPMSS.c 2006-05-24 11:56:47.000000000 +1000
+++ linux-2.6.17-rc4.orig/net/ipv4/netfilter/ipt_TCPMSS.c 2006-05-24 12:59:32.000000000 +1000
@@ -81,7 +81,7 @@ ipt_tcpmss_target(struct sk_buff **pskb,
printk(KERN_ERR
"ipt_tcpmss_target: bad length (%d bytes)\n",
(*pskb)->len);
- return NF_DROP;
+ return IPT_CONTINUE;
}
if(tcpmssinfo->mss == IPT_TCPMSS_CLAMP_PMTU) {
@@ -89,14 +89,14 @@ ipt_tcpmss_target(struct sk_buff **pskb,
if (net_ratelimit())
printk(KERN_ERR
"ipt_tcpmss_target: no dst?! can't determine path-MTU\n");
- return NF_DROP; /* or IPT_CONTINUE ?? */
+ return IPT_CONTINUE;
}
if(dst_mtu((*pskb)->dst) <= (sizeof(struct iphdr) + sizeof(struct tcphdr))) {
if (net_ratelimit())
printk(KERN_ERR
"ipt_tcpmss_target: unknown or invalid path-MTU (%d)\n", dst_mtu((*pskb)->dst));
- return NF_DROP; /* or IPT_CONTINUE ?? */
+ return IPT_CONTINUE;
}
newmss = dst_mtu((*pskb)->dst) - sizeof(struct iphdr) - sizeof(struct tcphdr);
@@ -147,7 +147,7 @@ ipt_tcpmss_target(struct sk_buff **pskb,
if (net_ratelimit())
printk(KERN_ERR "ipt_tcpmss_target:"
" unable to allocate larger skb\n");
- return NF_DROP;
+ return IPT_CONTINUE;
}
kfree_skb(*pskb);
--
next prev parent reply other threads:[~2006-05-24 4:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-24 4:04 [PATCH 0/4] netfilter patches for consideration philipc
2006-05-24 4:04 ` philipc [this message]
2006-05-24 16:16 ` [PATCH 1/4] TCPMSS: dont drop packets Patrick McHardy
2006-05-24 23:42 ` Philip Craig
2006-05-26 14:40 ` Patrick McHardy
2006-05-24 4:04 ` [PATCH 2/4] TCPMSS: clamp to input interface MTU too philipc
2006-05-24 16:18 ` Patrick McHardy
2006-05-24 4:04 ` [PATCH 3/4] log dropped ICMP redirects philipc
2006-05-24 16:26 ` Patrick McHardy
2006-05-25 2:34 ` Philip Craig
2006-05-26 14:49 ` Patrick McHardy
2006-05-24 4:04 ` [PATCH 4/4] drop ftp bounce attacks philipc
2006-05-24 16:31 ` Patrick McHardy
2006-05-25 2:55 ` Philip Craig
2006-05-26 14:51 ` Patrick McHardy
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=20060524040950.838105000@snapgear.com \
--to=philipc@snapgear.com \
--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.