lkml.org 
[lkml]   [2002]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 2.5.45 net/ipv4/netfilter/ipt_TCPMSS.c - Fix for pmtu changes
This patch fixes ipt_TCPMSS.c to use the dst_pmtu function to pull the 
destination MTU value.
--- net/ipv4/netfilter/ipt_TCPMSS.c.orig 2002-10-30 22:59:53.000000000 -0500
+++ net/ipv4/netfilter/ipt_TCPMSS.c 2002-10-30 23:08:58.000000000 -0500
@@ -48,6 +48,7 @@
u_int16_t tcplen, newtotlen, oldval, newmss;
unsigned int i;
u_int8_t *opt;
+ struct rtable *rt;

/* raw socket (tcpdump) may have clone of incoming skb: don't
disturb it --RR */
@@ -85,14 +86,16 @@
return NF_DROP; /* or IPT_CONTINUE ?? */
}

- if((*pskb)->dst->pmtu <= (sizeof(struct iphdr) + sizeof(struct tcphdr))) {
+ rt = (struct rtable *)(*pskb)->dst;
+
+ if(dst_pmtu(&rt->u.dst) <= (sizeof(struct iphdr) + sizeof(struct tcphdr))) {
if (net_ratelimit())
printk(KERN_ERR
- "ipt_tcpmss_target: unknown or invalid path-MTU (%d)\n", (*pskb)->dst->pmtu);
+ "ipt_tcpmss_target: unknown or invalid path-MTU (%d)\n", dst_pmtu(&rt->u.dst));
return NF_DROP; /* or IPT_CONTINUE ?? */
}

- newmss = (*pskb)->dst->pmtu - sizeof(struct iphdr) - sizeof(struct tcphdr);
+ newmss = dst_pmtu(&rt->u.dst) - sizeof(struct iphdr) - sizeof(struct tcphdr);
} else
newmss = tcpmssinfo->mss;
\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.027 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site