summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2011-01-31 01:43:20 +0100
committerJan Engelhardt <jengelh@medozas.de>2011-01-31 01:45:34 +0100
commit298d70e8564f03c844435123bf36e84419c2f65a (patch)
treebb5b49dd6c04b68e0a2e295f06c320823535949f
parent927385017047dce3f01c0aee73ab2989b108bbf0 (diff)
libxt_u32: enclose argument in quotes
Otherwise ip6tables-save piped to ip6tables-restore can cause a parse error when the expression list is empty. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
-rw-r--r--extensions/libxt_u32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/extensions/libxt_u32.c b/extensions/libxt_u32.c
index 054a5b24..378de0c9 100644
--- a/extensions/libxt_u32.c
+++ b/extensions/libxt_u32.c
@@ -45,6 +45,7 @@ static void u32_dump(const struct xt_u32 *data)
const struct xt_u32_test *ct;
unsigned int testind, i;
+ putchar('\"');
for (testind = 0; testind < data->ntests; ++testind) {
ct = &data->tests[testind];
@@ -81,7 +82,7 @@ static void u32_dump(const struct xt_u32 *data)
ct->value[i].max);
}
}
- printf(" ");
+ printf("\" ");
}
/* string_to_number() is not quite what we need here ... */