From 1bad0c75aa5696590d5cc7279ae6a6830f761d16 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Fri, 30 Jan 2015 12:47:16 +0100 Subject: extensions: cleanup commented code in ebtables-compat extensions This code can be cleaned up. No need for validation from userspace, the kernel will reject incorrect options. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- extensions/libebt_802_3.c | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'extensions/libebt_802_3.c') diff --git a/extensions/libebt_802_3.c b/extensions/libebt_802_3.c index 3ca80f77..e19c21d0 100644 --- a/extensions/libebt_802_3.c +++ b/extensions/libebt_802_3.c @@ -44,8 +44,6 @@ static void br802_3_init(struct xt_entry_match *match) info->bitmask = 0; } -/*static int parse(int c, char **argv, int argc, const struct ebt_u_entry *entry, - unsigned int *flags, struct ebt_entry_match **match)*/ static int br802_3_parse(int c, char **argv, int invert, unsigned int *flags, const void *entry, struct xt_entry_match **match) @@ -87,17 +85,11 @@ br802_3_parse(int c, char **argv, int invert, unsigned int *flags, static void br802_3_final_check(unsigned int flags) { - /*if (!(entry->bitmask & EBT_802_3)) - ebt_print_error("For 802.3 DSAP/SSAP filtering the protocol " - "must be LENGTH"); - */ if (!flags) xtables_error(PARAMETER_PROBLEM, "You must specify proper arguments"); } -/*static void print(const struct ebt_u_entry *entry, - const struct ebt_entry_match *match)*/ static void br802_3_print(const void *ip, const struct xt_entry_match *match, int numeric) { @@ -116,28 +108,7 @@ static void br802_3_print(const void *ip, const struct xt_entry_match *match, printf("0x%.4x ", ntohs(info->type)); } } -/* -static int compare(const struct ebt_entry_match *m1, - const struct ebt_entry_match *m2) -{ - struct ebt_802_3_info *info1 = (struct ebt_802_3_info *)m1->data; - struct ebt_802_3_info *info2 = (struct ebt_802_3_info *)m2->data; - if (info1->bitmask != info2->bitmask) - return 0; - if (info1->invflags != info2->invflags) - return 0; - if (info1->bitmask & EBT_802_3_SAP) { - if (info1->sap != info2->sap) - return 0; - } - if (info1->bitmask & EBT_802_3_TYPE) { - if (info1->type != info2->type) - return 0; - } - return 1; -} -*/ static struct xtables_match br802_3_match = { .name = "802_3", -- cgit v1.2.3