FIX: active ftp for v0.1.18

Christopher J. Reimer reimer@doe.carleton.ca
Mon, 14 Feb 2000 18:30:12 -0500 (EST)


	Hi, I finally figured out what was causing my problem (and others
 too) with active ftp not working after the 2nd PORT command.  Basically
ip_nat_ftp.c's help routine was occasionally modifying invalid skb
buffers.  This patch works on 0.1.18 for sure, and I bet it works on
multiple previous versions too.

--- ip_nat_ftp.c.orig   Tue Jan 11 22:50:00 2000
+++ ip_nat_ftp.c        Mon Feb 14 18:27:23 2000
@@ -237,6 +237,10 @@
                        ret = NF_DROP;
                        goto out;
                }
+      /* these pointers need to be refreshed since mangle_packet 
+        just modified their parent pointer (*pskb) C.Reimer */
+               iph = (*pskb)->nh.iph;
+               tcph = (void *)iph + iph->ihl*4;
        }
 
        /* Only mangle packets once: original direction in POST_ROUTING

--

Christopher Reimer
http://www.doe.carleton.ca/~reimer/
chris_reimer@bigfoot.com
PGP Public Key available at web site, PGP Keyservers, ID 171F8CF1,
or "finger"ing reimer@www.doe.carleton.ca