* [PATCH net-next] nf_nat: make find/put static
@ 2010-10-02 5:17 Stephen Hemminger
2010-10-04 18:54 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2010-10-02 5:17 UTC (permalink / raw)
To: Patrick McHardy, David Miller; +Cc: netfilter-devel, netdev
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>
--- a/include/net/netfilter/nf_nat_protocol.h 2010-10-02 09:01:09.153396885 +0900
+++ b/include/net/netfilter/nf_nat_protocol.h 2010-10-02 09:01:55.340910304 +0900
@@ -45,9 +45,6 @@ struct nf_nat_protocol {
extern int nf_nat_protocol_register(const struct nf_nat_protocol *proto);
extern void nf_nat_protocol_unregister(const struct nf_nat_protocol *proto);
-extern const struct nf_nat_protocol *nf_nat_proto_find_get(u_int8_t protocol);
-extern void nf_nat_proto_put(const struct nf_nat_protocol *proto);
-
/* Built-in protocols. */
extern const struct nf_nat_protocol nf_nat_protocol_tcp;
extern const struct nf_nat_protocol nf_nat_protocol_udp;
--- a/net/ipv4/netfilter/nf_nat_core.c 2010-10-02 09:01:09.183396507 +0900
+++ b/net/ipv4/netfilter/nf_nat_core.c 2010-10-02 09:01:55.340910304 +0900
@@ -47,7 +47,7 @@ __nf_nat_proto_find(u_int8_t protonum)
return rcu_dereference(nf_nat_protos[protonum]);
}
-const struct nf_nat_protocol *
+static const struct nf_nat_protocol *
nf_nat_proto_find_get(u_int8_t protonum)
{
const struct nf_nat_protocol *p;
@@ -60,14 +60,12 @@ nf_nat_proto_find_get(u_int8_t protonum)
return p;
}
-EXPORT_SYMBOL_GPL(nf_nat_proto_find_get);
-void
+static void
nf_nat_proto_put(const struct nf_nat_protocol *p)
{
module_put(p->me);
}
-EXPORT_SYMBOL_GPL(nf_nat_proto_put);
/* We keep an extra hash for each conntrack, for fast searching. */
static inline unsigned int
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] nf_nat: make find/put static
2010-10-02 5:17 [PATCH net-next] nf_nat: make find/put static Stephen Hemminger
@ 2010-10-04 18:54 ` Patrick McHardy
0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2010-10-04 18:54 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netfilter-devel, netdev
Am 02.10.2010 07:17, schrieb Stephen Hemminger:
> 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.
Applied, thanks Stephen.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-04 18:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-02 5:17 [PATCH net-next] nf_nat: make find/put static Stephen Hemminger
2010-10-04 18:54 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).