On Fri, Nov 21, 2003 at 12:17:30AM +0530, Ram Chandar wrote:
> 
> 
> If the packet had been recognised by state code it wouldn't have
> encountered the Tender Loving Care of the Firewall code 
> for passing/blocking/logging/screaming.
> 
> the "p" .. is caused by "pass in log quick on ppp0 proto icmp from any to any"
> in my ipnat.conf. 
> 

True. I located the problem. See the attached diff.

-Guido
--- ip_state.c.orig     Sat Jun  7 13:55:55 2003
+++ ip_state.c  Fri Nov 21 08:35:06 2003
@@ -1210,6 +1207,10 @@
 
        oip = (ip_t *)((char *)ic + ICMPERR_ICMPHLEN);
        ohlen = oip->ip_hl << 2;
+       /*
+        * Check if the at least the old IP header (with options) and
+        * 8 bytes of payload is present.
+        */
        if (fin->fin_plen < ICMPERR_MAXPKTLEN + ohlen - sizeof(*oip))
                return NULL;
 
@@ -1353,8 +1354,11 @@
                 * encapsulated packet was allowed through the
                 * other way around. Note that the minimal amount
                 * of info present does not allow for checking against
-                * tcp internals such as seq and ack numbers.
+                * tcp internals such as seq and ack numbers. Only the ports
+                * are knonw to be present.
+                * That is why we must clear the SHORT flag in this case.
                 */
+               ofin.fin_fl &= ~FI_SHORT;
                if ((is->is_p == pr) && (is->is_v == 4) &&
                    fr_matchsrcdst(is, src, dst, &ofin, tcp)) {
                        fr = is->is_rule;

Reply via email to