diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2008-11-18 12:26:26 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-11-18 12:26:26 +0100 |
commit | c354105d3578e3dd1ec825a57005fe60c095f7cb (patch) | |
tree | 8f408c1b77a2613c14cf3722a4f0afc540600021 /iptables-restore.c | |
parent | 928c4879e3a0da9dac6159c4d0f64a868e27f6e7 (diff) |
src: reuse the global modprobe_program variable
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'iptables-restore.c')
-rw-r--r-- | iptables-restore.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/iptables-restore.c b/iptables-restore.c index 12e558d7..4ea9306b 100644 --- a/iptables-restore.c +++ b/iptables-restore.c @@ -55,7 +55,7 @@ static void print_usage(const char *name, const char *version) exit(1); } -static struct iptc_handle *create_handle(const char *tablename, const char *modprobe) +static struct iptc_handle *create_handle(const char *tablename) { struct iptc_handle *handle; @@ -63,7 +63,7 @@ static struct iptc_handle *create_handle(const char *tablename, const char *modp if (!handle) { /* try to insmod the module if iptc_init failed */ - load_xtables_ko(modprobe, 0); + load_xtables_ko(modprobe_program, 0); handle = iptc_init(tablename); } @@ -124,7 +124,6 @@ main(int argc, char *argv[]) int c; char curtable[IPT_TABLE_MAXNAMELEN + 1]; FILE *in; - const char *modprobe = NULL; int in_table = 0, testing = 0; const char *tablename = NULL; @@ -167,7 +166,7 @@ main(int argc, char *argv[]) noflush = 1; break; case 'M': - modprobe = optarg; + modprobe_program = optarg; break; case 'T': tablename = optarg; @@ -231,7 +230,7 @@ main(int argc, char *argv[]) if (handle) iptc_free(handle); - handle = create_handle(table, modprobe); + handle = create_handle(table); if (noflush == 0) { DEBUGP("Cleaning all chains of table '%s'\n", table); |