Skip to contentSkip to conversation

netfilter: xtables make functions local

PATCH Applied Stephen Hemminger 4 participants 5 messages Dec 27, 2013 – Dec 30, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: xtables make functions local

A couple of functions only used in x_tables, don't need to be global

---
 include/linux/netfilter/x_tables.h |    2 --
 net/netfilter/x_tables.c           |    6 ++----
 2 files changed, 2 insertions(+), 6 deletions(-)
include/linux/netfilter/x_tables.h +0 -2
@@ -255,8 +255,6 @@ struct xt_table_info *xt_replace_table(s
 				       struct xt_table_info *newinfo,
 				       int *error);
 
-struct xt_match *xt_find_match(u8 af, const char *name, u8 revision);
-struct xt_target *xt_find_target(u8 af, const char *name, u8 revision);
 struct xt_match *xt_request_find_match(u8 af, const char *name, u8 revision);
 struct xt_target *xt_request_find_target(u8 af, const char *name, u8 revision);
 int xt_find_revision(u8 af, const char *name, u8 revision, int target,
net/netfilter/x_tables.c +2 -4
@@ -189,7 +189,7 @@ EXPORT_SYMBOL(xt_unregister_matches);
  */
 
 /* Find match, grabs ref.  Returns ERR_PTR() on error. */
-struct xt_match *xt_find_match(u8 af, const char *name, u8 revision)
+static struct xt_match *xt_find_match(u8 af, const char *name, u8 revision)
 {
 	struct xt_match *m;
 	int err = -ENOENT;
@@ -216,7 +216,6 @@ struct xt_match *xt_find_match(u8 af, co
 
 	return ERR_PTR(err);
 }
-EXPORT_SYMBOL(xt_find_match);
 
 struct xt_match *
 xt_request_find_match(uint8_t nfproto, const char *name, uint8_t revision)
@@ -234,7 +233,7 @@ xt_request_find_match(uint8_t nfproto, c
 EXPORT_SYMBOL_GPL(xt_request_find_match);
 
 /* Find target, grabs ref.  Returns ERR_PTR() on error. */
-struct xt_target *xt_find_target(u8 af, const char *name, u8 revision)
+static struct xt_target *xt_find_target(u8 af, const char *name, u8 revision)
 {
 	struct xt_target *t;
 	int err = -ENOENT;
@@ -261,7 +260,6 @@ struct xt_target *xt_find_target(u8 af,
 
 	return ERR_PTR(err);
 }
-EXPORT_SYMBOL(xt_find_target);
 
 struct xt_target *xt_request_find_target(u8 af, const char *name, u8 revision)
 {
#2 lore raw
Quoted 8 lines · David Miller

From: Stephen Hemminger <[email protected]>
Date: Fri, 27 Dec 2013 12:09:37 -0800

Quoted 3 lines

A couple of functions only used in x_tables, don't need to be global

I'll let Pablo pick this up, thanks.

Negative, there is at least one known external modules using these.

#3 lore raw
Quoted 5 lines · Jan Engelhardt
Quoted 3 lines · David Miller

From: Stephen Hemminger <[email protected]>
Date: Fri, 27 Dec 2013 12:09:37 -0800

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

A couple of functions only used in x_tables, don't need to be global

I'll let Pablo pick this up, thanks.

Negative, there is at least one known external modules using these.

Unfortunately, we cannot keep symbols for out of tree modules, that has been the longterm policy.