diff options
author | Phil Oester <kernel@linuxace.com> | 2013-07-06 08:56:01 -0700 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-07-24 20:45:07 +0200 |
commit | 33b529a7208952c250f245557d248e50ce533c7d (patch) | |
tree | 5c2099c65effd49568b1a6be306ddfe1b2ee624d /extensions/libip6t_LOG.c | |
parent | 88b73a2bad9fc02355fad70698cc2c9469048abc (diff) |
libip6t_LOG: target output is different to libipt_LOG
libipt_LOG is using the xtables_save_string func, which
escapes unsafe characters as needed. libip6t_LOG should
do the same.
Signed-off-by: Phil Oester <kernel@linuxace.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions/libip6t_LOG.c')
-rw-r--r-- | extensions/libip6t_LOG.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/extensions/libip6t_LOG.c b/extensions/libip6t_LOG.c index 2b1ae289..4639268d 100644 --- a/extensions/libip6t_LOG.c +++ b/extensions/libip6t_LOG.c @@ -146,8 +146,10 @@ static void LOG_save(const void *ip, const struct xt_entry_target *target) const struct ip6t_log_info *loginfo = (const struct ip6t_log_info *)target->data; - if (strcmp(loginfo->prefix, "") != 0) - printf(" --log-prefix \"%s\"", loginfo->prefix); + if (strcmp(loginfo->prefix, "") != 0) { + printf(" --log-prefix"); + xtables_save_string(loginfo->prefix); + } if (loginfo->level != LOG_DEFAULT_LEVEL) printf(" --log-level %d", loginfo->level); |