X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=net%2Fnetfilter%2Fnf_conntrack_proto_generic.c;h=53bf12abbe05f5f8dbdf9194073e694667cd8057;hp=e2091d0c7a2fb7b232d606a3f6940b1150e4cfb8;hb=d7cde286daad20dd171247ea47fc5ff4868591f0;hpb=894c6350eaad7e613ae267504014a456e00a3e2a diff --git a/net/netfilter/nf_conntrack_proto_generic.c b/net/netfilter/nf_conntrack_proto_generic.c index e2091d0c7a2f..53bf12abbe05 100644 --- a/net/netfilter/nf_conntrack_proto_generic.c +++ b/net/netfilter/nf_conntrack_proto_generic.c @@ -14,6 +14,30 @@ static unsigned int nf_ct_generic_timeout __read_mostly = 600*HZ; +static bool nf_generic_should_process(u8 proto) +{ + switch (proto) { +#ifdef CONFIG_NF_CT_PROTO_SCTP_MODULE + case IPPROTO_SCTP: + return false; +#endif +#ifdef CONFIG_NF_CT_PROTO_DCCP_MODULE + case IPPROTO_DCCP: + return false; +#endif +#ifdef CONFIG_NF_CT_PROTO_GRE_MODULE + case IPPROTO_GRE: + return false; +#endif +#ifdef CONFIG_NF_CT_PROTO_UDPLITE_MODULE + case IPPROTO_UDPLITE: + return false; +#endif + default: + return true; + } +} + static bool generic_pkt_to_tuple(const struct sk_buff *skb, unsigned int dataoff, struct nf_conntrack_tuple *tuple) @@ -56,7 +80,7 @@ static int packet(struct nf_conn *ct, static bool new(struct nf_conn *ct, const struct sk_buff *skb, unsigned int dataoff) { - return true; + return nf_generic_should_process(nf_ct_protonum(ct)); } #ifdef CONFIG_SYSCTL