aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2008-10-08 05:35:16 -0400
committerPatrick McHardy <kaber@trash.net>2008-10-08 05:35:16 -0400
commit66bff35b722956cc2423f55fcf1b69cefa24ef8b (patch)
treeb9523669aff10e9d07031004eed5a1a12257977f /net/bridge
parent5365f8022e04310f0276c95e82548da917d514db (diff)
netfilter: remove unused Ebtables functions
Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/netfilter/ebtables.c108
1 files changed, 0 insertions, 108 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 7964d3f0388..b489ed262fa 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -56,9 +56,6 @@
56 56
57static DEFINE_MUTEX(ebt_mutex); 57static DEFINE_MUTEX(ebt_mutex);
58static LIST_HEAD(ebt_tables); 58static LIST_HEAD(ebt_tables);
59static LIST_HEAD(ebt_targets);
60static LIST_HEAD(ebt_matches);
61static LIST_HEAD(ebt_watchers);
62 59
63static struct xt_target ebt_standard_target = { 60static struct xt_target ebt_standard_target = {
64 .name = "standard", 61 .name = "standard",
@@ -322,24 +319,6 @@ find_table_lock(const char *name, int *error, struct mutex *mutex)
322 return find_inlist_lock(&ebt_tables, name, "ebtable_", error, mutex); 319 return find_inlist_lock(&ebt_tables, name, "ebtable_", error, mutex);
323} 320}
324 321
325static inline struct ebt_match *
326find_match_lock(const char *name, int *error, struct mutex *mutex)
327{
328 return find_inlist_lock(&ebt_matches, name, "ebt_", error, mutex);
329}
330
331static inline struct ebt_watcher *
332find_watcher_lock(const char *name, int *error, struct mutex *mutex)
333{
334 return find_inlist_lock(&ebt_watchers, name, "ebt_", error, mutex);
335}
336
337static inline struct ebt_target *
338find_target_lock(const char *name, int *error, struct mutex *mutex)
339{
340 return find_inlist_lock(&ebt_targets, name, "ebt_", error, mutex);
341}
342
343static inline int 322static inline int
344ebt_check_match(struct ebt_entry_match *m, struct ebt_entry *e, 323ebt_check_match(struct ebt_entry_match *m, struct ebt_entry *e,
345 const char *name, unsigned int hookmask, unsigned int *cnt) 324 const char *name, unsigned int hookmask, unsigned int *cnt)
@@ -1103,87 +1082,6 @@ free_newinfo:
1103 return ret; 1082 return ret;
1104} 1083}
1105 1084
1106int ebt_register_target(struct ebt_target *target)
1107{
1108 struct ebt_target *t;
1109 int ret;
1110
1111 ret = mutex_lock_interruptible(&ebt_mutex);
1112 if (ret != 0)
1113 return ret;
1114 list_for_each_entry(t, &ebt_targets, list) {
1115 if (strcmp(t->name, target->name) == 0) {
1116 mutex_unlock(&ebt_mutex);
1117 return -EEXIST;
1118 }
1119 }
1120 list_add(&target->list, &ebt_targets);
1121 mutex_unlock(&ebt_mutex);
1122
1123 return 0;
1124}
1125
1126void ebt_unregister_target(struct ebt_target *target)
1127{
1128 mutex_lock(&ebt_mutex);
1129 list_del(&target->list);
1130 mutex_unlock(&ebt_mutex);
1131}
1132
1133int ebt_register_match(struct ebt_match *match)
1134{
1135 struct ebt_match *m;
1136 int ret;
1137
1138 ret = mutex_lock_interruptible(&ebt_mutex);
1139 if (ret != 0)
1140 return ret;
1141 list_for_each_entry(m, &ebt_matches, list) {
1142 if (strcmp(m->name, match->name) == 0) {
1143 mutex_unlock(&ebt_mutex);
1144 return -EEXIST;
1145 }
1146 }
1147 list_add(&match->list, &ebt_matches);
1148 mutex_unlock(&ebt_mutex);
1149
1150 return 0;
1151}
1152
1153void ebt_unregister_match(struct ebt_match *match)
1154{
1155 mutex_lock(&ebt_mutex);
1156 list_del(&match->list);
1157 mutex_unlock(&ebt_mutex);
1158}
1159
1160int ebt_register_watcher(struct ebt_watcher *watcher)
1161{
1162 struct ebt_watcher *w;
1163 int ret;
1164
1165 ret = mutex_lock_interruptible(&ebt_mutex);
1166 if (ret != 0)
1167 return ret;
1168 list_for_each_entry(w, &ebt_watchers, list) {
1169 if (strcmp(w->name, watcher->name) == 0) {
1170 mutex_unlock(&ebt_mutex);
1171 return -EEXIST;
1172 }
1173 }
1174 list_add(&watcher->list, &ebt_watchers);
1175 mutex_unlock(&ebt_mutex);
1176
1177 return 0;
1178}
1179
1180void ebt_unregister_watcher(struct ebt_watcher *watcher)
1181{
1182 mutex_lock(&ebt_mutex);
1183 list_del(&watcher->list);
1184 mutex_unlock(&ebt_mutex);
1185}
1186
1187int ebt_register_table(struct ebt_table *table) 1085int ebt_register_table(struct ebt_table *table)
1188{ 1086{
1189 struct ebt_table_info *newinfo; 1087 struct ebt_table_info *newinfo;
@@ -1575,12 +1473,6 @@ static void __exit ebtables_fini(void)
1575 1473
1576EXPORT_SYMBOL(ebt_register_table); 1474EXPORT_SYMBOL(ebt_register_table);
1577EXPORT_SYMBOL(ebt_unregister_table); 1475EXPORT_SYMBOL(ebt_unregister_table);
1578EXPORT_SYMBOL(ebt_register_match);
1579EXPORT_SYMBOL(ebt_unregister_match);
1580EXPORT_SYMBOL(ebt_register_watcher);
1581EXPORT_SYMBOL(ebt_unregister_watcher);
1582EXPORT_SYMBOL(ebt_register_target);
1583EXPORT_SYMBOL(ebt_unregister_target);
1584EXPORT_SYMBOL(ebt_do_table); 1476EXPORT_SYMBOL(ebt_do_table);
1585module_init(ebtables_init); 1477module_init(ebtables_init);
1586module_exit(ebtables_fini); 1478module_exit(ebtables_fini);