Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: nf_nat: make find/put static

The functions nf_nat_proto_find_get and nf_nat_proto_put are
only used internally in nf_nat_core. This might break some out
of tree NAT module.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>

authored by

Stephen Hemminger and committed by
Patrick McHardy
0c200d93 758ff033

+2 -7
-3
include/net/netfilter/nf_nat_protocol.h
··· 45 45 extern int nf_nat_protocol_register(const struct nf_nat_protocol *proto); 46 46 extern void nf_nat_protocol_unregister(const struct nf_nat_protocol *proto); 47 47 48 - extern const struct nf_nat_protocol *nf_nat_proto_find_get(u_int8_t protocol); 49 - extern void nf_nat_proto_put(const struct nf_nat_protocol *proto); 50 - 51 48 /* Built-in protocols. */ 52 49 extern const struct nf_nat_protocol nf_nat_protocol_tcp; 53 50 extern const struct nf_nat_protocol nf_nat_protocol_udp;
+2 -4
net/ipv4/netfilter/nf_nat_core.c
··· 47 47 return rcu_dereference(nf_nat_protos[protonum]); 48 48 } 49 49 50 - const struct nf_nat_protocol * 50 + static const struct nf_nat_protocol * 51 51 nf_nat_proto_find_get(u_int8_t protonum) 52 52 { 53 53 const struct nf_nat_protocol *p; ··· 60 60 61 61 return p; 62 62 } 63 - EXPORT_SYMBOL_GPL(nf_nat_proto_find_get); 64 63 65 - void 64 + static void 66 65 nf_nat_proto_put(const struct nf_nat_protocol *p) 67 66 { 68 67 module_put(p->me); 69 68 } 70 - EXPORT_SYMBOL_GPL(nf_nat_proto_put); 71 69 72 70 /* We keep an extra hash for each conntrack, for fast searching. */ 73 71 static inline unsigned int