netfilter: conntrack: remove l4proto init and get_net callbacks
Those were needed we still had modular trackers. As we don't have those anymore, prefer direct calls and remove all the (un)register infrastructure associated with this. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
committed by
Pablo Neira Ayuso
parent
70aed4647c
commit
2a389de86e
@@ -61,12 +61,6 @@ struct nf_conntrack_l4proto {
|
||||
/* Print out the private part of the conntrack. */
|
||||
void (*print_conntrack)(struct seq_file *s, struct nf_conn *);
|
||||
#endif
|
||||
|
||||
/* Init l4proto pernet data */
|
||||
int (*init_net)(struct net *net);
|
||||
|
||||
/* Return the per-net protocol part. */
|
||||
struct nf_proto_net *(*get_net_proto)(struct net *net);
|
||||
};
|
||||
|
||||
bool icmp_pkt_to_tuple(const struct sk_buff *skb,
|
||||
@@ -135,6 +129,15 @@ int nf_conntrack_gre_packet(struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
const struct nf_hook_state *state);
|
||||
|
||||
void nf_conntrack_generic_init_net(struct net *net);
|
||||
void nf_conntrack_tcp_init_net(struct net *net);
|
||||
void nf_conntrack_udp_init_net(struct net *net);
|
||||
void nf_conntrack_gre_init_net(struct net *net);
|
||||
void nf_conntrack_dccp_init_net(struct net *net);
|
||||
void nf_conntrack_sctp_init_net(struct net *net);
|
||||
void nf_conntrack_icmp_init_net(struct net *net);
|
||||
void nf_conntrack_icmpv6_init_net(struct net *net);
|
||||
|
||||
/* Existing built-in generic protocol */
|
||||
extern const struct nf_conntrack_l4proto nf_conntrack_l4proto_generic;
|
||||
|
||||
|
||||
@@ -18,17 +18,11 @@
|
||||
struct ctl_table_header;
|
||||
struct nf_conntrack_ecache;
|
||||
|
||||
struct nf_proto_net {
|
||||
unsigned int users;
|
||||
};
|
||||
|
||||
struct nf_generic_net {
|
||||
struct nf_proto_net pn;
|
||||
unsigned int timeout;
|
||||
};
|
||||
|
||||
struct nf_tcp_net {
|
||||
struct nf_proto_net pn;
|
||||
unsigned int timeouts[TCP_CONNTRACK_TIMEOUT_MAX];
|
||||
unsigned int tcp_loose;
|
||||
unsigned int tcp_be_liberal;
|
||||
@@ -42,18 +36,15 @@ enum udp_conntrack {
|
||||
};
|
||||
|
||||
struct nf_udp_net {
|
||||
struct nf_proto_net pn;
|
||||
unsigned int timeouts[UDP_CT_MAX];
|
||||
};
|
||||
|
||||
struct nf_icmp_net {
|
||||
struct nf_proto_net pn;
|
||||
unsigned int timeout;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_NF_CT_PROTO_DCCP
|
||||
struct nf_dccp_net {
|
||||
struct nf_proto_net pn;
|
||||
int dccp_loose;
|
||||
unsigned int dccp_timeout[CT_DCCP_MAX + 1];
|
||||
};
|
||||
@@ -61,7 +52,6 @@ struct nf_dccp_net {
|
||||
|
||||
#ifdef CONFIG_NF_CT_PROTO_SCTP
|
||||
struct nf_sctp_net {
|
||||
struct nf_proto_net pn;
|
||||
unsigned int timeouts[SCTP_CONNTRACK_MAX];
|
||||
};
|
||||
#endif
|
||||
@@ -74,7 +64,6 @@ enum gre_conntrack {
|
||||
};
|
||||
|
||||
struct nf_gre_net {
|
||||
struct nf_proto_net nf;
|
||||
struct list_head keymap_list;
|
||||
unsigned int timeouts[GRE_CT_MAX];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user