* [NETFILTER]: Account for IPv4 options in xt_TCPMSS
@ 2008-03-29 15:57 Jan Engelhardt
2008-04-01 12:55 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Jan Engelhardt @ 2008-03-29 15:57 UTC (permalink / raw)
To: kaber; +Cc: davem, Netfilter Developer Mailing List
I am not exactly sure why 'minlen' only needed to be 40 bytes
sizeof(iph)+tcphdr; does not the IP header must fit entirely
into the MTU?
===
commit db400aa3480d466bc4f2d83f258a861657fc6619
Author: Jan Engelhardt <jengelh@computergmbh.de>
Date: Sat Mar 29 16:51:01 2008 +0100
[NETFILTER]: Account for IPv4 options in xt_TCPMSS
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
---
net/netfilter/xt_TCPMSS.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c
index 217e2b6..1662d89 100644
--- a/net/netfilter/xt_TCPMSS.c
+++ b/net/netfilter/xt_TCPMSS.c
@@ -179,8 +179,8 @@ tcpmss_tg4(struct sk_buff *skb, const struct net_device *in,
int ret;
ret = tcpmss_mangle_packet(skb, targinfo, tcpmss_reverse_mtu4(iph),
- iph->ihl * 4,
- sizeof(*iph) + sizeof(struct tcphdr));
+ ip_hdrlen(skb),
+ ip_hdrlen(skb) + sizeof(struct tcphdr));
if (ret < 0)
return NF_DROP;
if (ret > 0) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-01 12:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-29 15:57 [NETFILTER]: Account for IPv4 options in xt_TCPMSS Jan Engelhardt
2008-04-01 12:55 ` Patrick McHardy
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.