[PATCH] NETFILTER: {ip,nf}_nat_proto_gre: do not modify/corrupt GREv0 packets through NAT
authorJorge Boncompte <jorge@dti2.net>
Thu, 3 May 2007 01:14:27 +0000 (03:14 +0200)
committerChris Wright <chrisw@sous-sol.org>
Wed, 23 May 2007 21:32:42 +0000 (14:32 -0700)
commitc0aadfd9fe3cd8a910e6b89662084d14cb71fa89
tree0afcb07d903653b432766ca827295ff75d7c391f
parent1ea6b2418cd2c6a6f31067ed6ece5cd12c69351e
[PATCH] NETFILTER: {ip,nf}_nat_proto_gre: do not modify/corrupt GREv0 packets through NAT

While porting some changes of the 2.6.21-rc7 pptp/proto_gre conntrack
and nat modules to a 2.4.32 kernel I noticed that the gre_key function
returns a wrong pointer to the GRE key of a version 0 packet thus
corrupting the packet payload.

The intended behaviour for GREv0 packets is to act like
nf_conntrack_proto_generic/nf_nat_proto_unknown so I have ripped the
offending functions (not used anymore) and modified the
nf_nat_proto_gre modules to not touch version 0 (non PPTP) packets.

Signed-off-by: Jorge Boncompte <jorge@dti2.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
include/linux/netfilter/nf_conntrack_proto_gre.h
include/linux/netfilter_ipv4/ip_conntrack_proto_gre.h
net/ipv4/netfilter/ip_nat_proto_gre.c
net/ipv4/netfilter/nf_nat_proto_gre.c