[netfilter-cvslog] r3965 -
trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter
laforge at netfilter.org
laforge at netfilter.org
Mon Jun 6 18:31:27 CEST 2005
Author: laforge at netfilter.org
Date: 2005-06-06 18:31:26 +0200 (Mon, 06 Jun 2005)
New Revision: 3965
Modified:
trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_nat_proto_gre.c
Log:
pptp-enhanced GRE header has _optional_ fields at the end. we need to call skb_make_writable() on the mandatory size, not the optional one.
Modified: trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_nat_proto_gre.c
===================================================================
--- trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_nat_proto_gre.c 2005-06-05 04:46:10 UTC (rev 3964)
+++ trunk/patch-o-matic-ng/pptp-conntrack-nat/linux-2.6/net/ipv4/netfilter/ip_nat_proto_gre.c 2005-06-06 16:31:26 UTC (rev 3965)
@@ -109,7 +109,9 @@
struct iphdr *iph = (struct iphdr *)((*pskb)->data + iphdroff);
unsigned int hdroff = iphdroff + iph->ihl*4;
- if (!skb_ip_make_writable(pskb, hdroff + sizeof(*pgreh)))
+ /* pgreh includes two optional 32bit fields which are not required
+ * to be there. That's where the magic '8' comes from */
+ if (!skb_ip_make_writable(pskb, hdroff + sizeof(*pgreh)-8))
return 0;
greh = (void *)(*pskb)->data + hdroff;
More information about the netfilter-cvslog
mailing list