diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2008-10-08 05:35:16 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-10-08 05:35:16 -0400 |
commit | 66bff35b722956cc2423f55fcf1b69cefa24ef8b (patch) | |
tree | b9523669aff10e9d07031004eed5a1a12257977f /net/bridge | |
parent | 5365f8022e04310f0276c95e82548da917d514db (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.c | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index 7964d3f03886..b489ed262fa5 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c | |||
@@ -56,9 +56,6 @@ | |||
56 | 56 | ||
57 | static DEFINE_MUTEX(ebt_mutex); | 57 | static DEFINE_MUTEX(ebt_mutex); |
58 | static LIST_HEAD(ebt_tables); | 58 | static LIST_HEAD(ebt_tables); |
59 | static LIST_HEAD(ebt_targets); | ||
60 | static LIST_HEAD(ebt_matches); | ||
61 | static LIST_HEAD(ebt_watchers); | ||
62 | 59 | ||
63 | static struct xt_target ebt_standard_target = { | 60 | static 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 | ||
325 | static inline struct ebt_match * | ||
326 | find_match_lock(const char *name, int *error, struct mutex *mutex) | ||
327 | { | ||
328 | return find_inlist_lock(&ebt_matches, name, "ebt_", error, mutex); | ||
329 | } | ||
330 | |||
331 | static inline struct ebt_watcher * | ||
332 | find_watcher_lock(const char *name, int *error, struct mutex *mutex) | ||
333 | { | ||
334 | return find_inlist_lock(&ebt_watchers, name, "ebt_", error, mutex); | ||
335 | } | ||
336 | |||
337 | static inline struct ebt_target * | ||
338 | find_target_lock(const char *name, int *error, struct mutex *mutex) | ||
339 | { | ||
340 | return find_inlist_lock(&ebt_targets, name, "ebt_", error, mutex); | ||
341 | } | ||
342 | |||
343 | static inline int | 322 | static inline int |
344 | ebt_check_match(struct ebt_entry_match *m, struct ebt_entry *e, | 323 | ebt_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 | ||
1106 | int 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 | |||
1126 | void 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 | |||
1133 | int 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 | |||
1153 | void 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 | |||
1160 | int 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 | |||
1180 | void 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 | |||
1187 | int ebt_register_table(struct ebt_table *table) | 1085 | int 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 | ||
1576 | EXPORT_SYMBOL(ebt_register_table); | 1474 | EXPORT_SYMBOL(ebt_register_table); |
1577 | EXPORT_SYMBOL(ebt_unregister_table); | 1475 | EXPORT_SYMBOL(ebt_unregister_table); |
1578 | EXPORT_SYMBOL(ebt_register_match); | ||
1579 | EXPORT_SYMBOL(ebt_unregister_match); | ||
1580 | EXPORT_SYMBOL(ebt_register_watcher); | ||
1581 | EXPORT_SYMBOL(ebt_unregister_watcher); | ||
1582 | EXPORT_SYMBOL(ebt_register_target); | ||
1583 | EXPORT_SYMBOL(ebt_unregister_target); | ||
1584 | EXPORT_SYMBOL(ebt_do_table); | 1476 | EXPORT_SYMBOL(ebt_do_table); |
1585 | module_init(ebtables_init); | 1477 | module_init(ebtables_init); |
1586 | module_exit(ebtables_fini); | 1478 | module_exit(ebtables_fini); |