summaryrefslogtreecommitdiffstats
path: root/iptables/iptables-restore.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2011-08-27 09:56:16 +0200
committerJan Engelhardt <jengelh@medozas.de>2011-09-11 17:31:35 +0200
commit14da56743c6cdf25da35b7b5ca7a5d201771990d (patch)
treeb7894013b475dc16d130c9bed922cc0c7ae8afb5 /iptables/iptables-restore.c
parent1639fe86579f86f5f6a954a9b0adde2e16ad1980 (diff)
src: resolve old macro names that are indirections
Command used: git grep -f <(pcregrep -hior '(?<=#define\s)IP6?(T_\w+)(?=\s+X\1)' include/) and then fix all occurrences. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'iptables/iptables-restore.c')
-rw-r--r--iptables/iptables-restore.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/iptables/iptables-restore.c b/iptables/iptables-restore.c
index 7152d750..001da734 100644
--- a/iptables/iptables-restore.c
+++ b/iptables/iptables-restore.c
@@ -76,7 +76,7 @@ static struct xtc_handle *create_handle(const char *tablename)
return handle;
}
-static int parse_counters(char *string, struct ipt_counters *ctr)
+static int parse_counters(char *string, struct xt_counters *ctr)
{
unsigned long long pcnt, bcnt;
int ret;
@@ -119,7 +119,7 @@ iptables_restore_main(int argc, char *argv[])
struct xtc_handle *handle = NULL;
char buffer[10240];
int c;
- char curtable[IPT_TABLE_MAXNAMELEN + 1];
+ char curtable[XT_TABLE_MAXNAMELEN + 1];
FILE *in;
int in_table = 0, testing = 0;
const char *tablename = NULL;
@@ -217,8 +217,8 @@ iptables_restore_main(int argc, char *argv[])
prog_name, line);
exit(1);
}
- strncpy(curtable, table, IPT_TABLE_MAXNAMELEN);
- curtable[IPT_TABLE_MAXNAMELEN] = '\0';
+ strncpy(curtable, table, XT_TABLE_MAXNAMELEN);
+ curtable[XT_TABLE_MAXNAMELEN] = '\0';
if (tablename && (strcmp(tablename, table) != 0))
continue;
@@ -288,7 +288,7 @@ iptables_restore_main(int argc, char *argv[])
}
if (strcmp(policy, "-") != 0) {
- struct ipt_counters count;
+ struct xt_counters count;
if (counters) {
char *ctrs;
@@ -300,8 +300,7 @@ iptables_restore_main(int argc, char *argv[])
"for chain '%s'\n", chain);
} else {
- memset(&count, 0,
- sizeof(struct ipt_counters));
+ memset(&count, 0, sizeof(count));
}
DEBUGP("Setting policy of chain %s to %s\n",