Skip to content

Commit dcd93ed

Browse files
shemmingerummakynes
authored andcommitted
netfilter: nf_conntrack: remove dead code
The following code is not used in current upstream code. Some of this seems to be old hooks, other might be used by some out of tree module (which I don't care about breaking), and the need_ipv4_conntrack was used by old NAT code but no longer called. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 02eca9d commit dcd93ed

File tree

5 files changed

+0
-30
lines changed

5 files changed

+0
-30
lines changed

include/net/netfilter/ipv4/nf_conntrack_ipv4.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@ extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp;
1919
int nf_conntrack_ipv4_compat_init(void);
2020
void nf_conntrack_ipv4_compat_fini(void);
2121

22-
void need_ipv4_conntrack(void);
23-
2422
#endif /*_NF_CONNTRACK_IPV4_H*/

include/net/netfilter/nf_conntrack_l3proto.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ int nf_ct_l3proto_register(struct nf_conntrack_l3proto *proto);
8787
void nf_ct_l3proto_unregister(struct nf_conntrack_l3proto *proto);
8888

8989
struct nf_conntrack_l3proto *nf_ct_l3proto_find_get(u_int16_t l3proto);
90-
void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p);
9190

9291
/* Existing built-in protocols */
9392
extern struct nf_conntrack_l3proto nf_conntrack_l3proto_generic;

net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,3 @@ static void __exit nf_conntrack_l3proto_ipv4_fini(void)
548548

549549
module_init(nf_conntrack_l3proto_ipv4_init);
550550
module_exit(nf_conntrack_l3proto_ipv4_fini);
551-
552-
void need_ipv4_conntrack(void)
553-
{
554-
return;
555-
}
556-
EXPORT_SYMBOL_GPL(need_ipv4_conntrack);

net/netfilter/nf_conntrack_core.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ int (*nfnetlink_parse_nat_setup_hook)(struct nf_conn *ct,
6060
const struct nlattr *attr) __read_mostly;
6161
EXPORT_SYMBOL_GPL(nfnetlink_parse_nat_setup_hook);
6262

63-
int (*nf_nat_seq_adjust_hook)(struct sk_buff *skb,
64-
struct nf_conn *ct,
65-
enum ip_conntrack_info ctinfo,
66-
unsigned int protoff);
67-
EXPORT_SYMBOL_GPL(nf_nat_seq_adjust_hook);
68-
6963
DEFINE_SPINLOCK(nf_conntrack_lock);
7064
EXPORT_SYMBOL_GPL(nf_conntrack_lock);
7165

@@ -361,15 +355,6 @@ ____nf_conntrack_find(struct net *net, u16 zone,
361355
return NULL;
362356
}
363357

364-
struct nf_conntrack_tuple_hash *
365-
__nf_conntrack_find(struct net *net, u16 zone,
366-
const struct nf_conntrack_tuple *tuple)
367-
{
368-
return ____nf_conntrack_find(net, zone, tuple,
369-
hash_conntrack_raw(tuple, zone));
370-
}
371-
EXPORT_SYMBOL_GPL(__nf_conntrack_find);
372-
373358
/* Find a connection corresponding to a tuple. */
374359
static struct nf_conntrack_tuple_hash *
375360
__nf_conntrack_find_get(struct net *net, u16 zone,

net/netfilter/nf_conntrack_proto.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@ nf_ct_l3proto_find_get(u_int16_t l3proto)
9292
}
9393
EXPORT_SYMBOL_GPL(nf_ct_l3proto_find_get);
9494

95-
void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p)
96-
{
97-
module_put(p->me);
98-
}
99-
EXPORT_SYMBOL_GPL(nf_ct_l3proto_put);
100-
10195
int
10296
nf_ct_l3proto_try_module_get(unsigned short l3proto)
10397
{

0 commit comments

Comments
 (0)