mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] 2.5.45 net/ipv4/netfilter/ipt_TCPMSS.c - Fix for pmtu changes
@ 2002-10-31  4:14 David T Hollis
  0 siblings, 0 replies; only message in thread
From: David T Hollis @ 2002-10-31  4:14 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 97 bytes --]

This patch fixes ipt_TCPMSS.c to use the dst_pmtu function to pull the 
destination MTU value.  

[-- Attachment #2: linux-2.4.45-ipt_TCPMSS.patch --]
[-- Type: text/plain, Size: 1113 bytes --]

--- 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;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-31  4:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-31  4:14 [PATCH] 2.5.45 net/ipv4/netfilter/ipt_TCPMSS.c - Fix for pmtu changes David T Hollis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome