tools headers UAPI: Sync linux/prctl.h with the kernel sources
[linux-2.6-microblaze.git] / net / netfilter / nf_conntrack_proto_tcp.c
index ec23330..34e2241 100644 (file)
 #include <net/netfilter/ipv4/nf_conntrack_ipv4.h>
 #include <net/netfilter/ipv6/nf_conntrack_ipv6.h>
 
-/* "Be conservative in what you do,
-    be liberal in what you accept from others."
-    If it's non-zero, we mark only out of window RST segments as INVALID. */
-static int nf_ct_tcp_be_liberal __read_mostly = 0;
-
-/* If it is set to zero, we disable picking up already established
-   connections. */
-static int nf_ct_tcp_loose __read_mostly = 1;
-
-/* Max number of the retransmitted packets without receiving an (acceptable)
-   ACK from the destination. If this number is reached, a shorter timer
-   will be started. */
-static int nf_ct_tcp_max_retrans __read_mostly = 3;
-
   /* FIXME: Examine ipfilter's timeouts and conntrack transitions more
      closely.  They're more complex. --RR */
 
@@ -352,7 +338,8 @@ static void tcp_options(const struct sk_buff *skb,
 
        ptr = skb_header_pointer(skb, dataoff + sizeof(struct tcphdr),
                                 length, buff);
-       BUG_ON(ptr == NULL);
+       if (!ptr)
+               return;
 
        state->td_scale =
        state->flags = 0;
@@ -408,7 +395,8 @@ static void tcp_sack(const struct sk_buff *skb, unsigned int dataoff,
 
        ptr = skb_header_pointer(skb, dataoff + sizeof(struct tcphdr),
                                 length, buff);
-       BUG_ON(ptr == NULL);
+       if (!ptr)
+               return;
 
        /* Fast path for timestamp-only option */
        if (length == TCPOLEN_TSTAMP_ALIGNED
@@ -1436,9 +1424,23 @@ void nf_conntrack_tcp_init_net(struct net *net)
         * ->timeouts[0] contains 'new' timeout, like udp or icmp.
         */
        tn->timeouts[0] = tcp_timeouts[TCP_CONNTRACK_SYN_SENT];
-       tn->tcp_loose = nf_ct_tcp_loose;
-       tn->tcp_be_liberal = nf_ct_tcp_be_liberal;
-       tn->tcp_max_retrans = nf_ct_tcp_max_retrans;
+
+       /* If it is set to zero, we disable picking up already established
+        * connections.
+        */
+       tn->tcp_loose = 1;
+
+       /* "Be conservative in what you do,
+        *  be liberal in what you accept from others."
+        * If it's non-zero, we mark only out of window RST segments as INVALID.
+        */
+       tn->tcp_be_liberal = 0;
+
+       /* Max number of the retransmitted packets without receiving an (acceptable)
+        * ACK from the destination. If this number is reached, a shorter timer
+        * will be started.
+        */
+       tn->tcp_max_retrans = 3;
 }
 
 const struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp =