summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_LOG.c
diff options
context:
space:
mode:
authorThomas Woerner <twoerner@redhat.com>2003-07-14 20:01:29 +0000
committerHarald Welte <laforge@gnumonks.org>2003-07-14 20:01:29 +0000
commit01cbaa6125344733148615c1664be83d24097136 (patch)
tree02bde6d046d03548598dd1e0a2681b2ca5148780 /extensions/libipt_LOG.c
parent0acde1f28a576f5d4f2b51881555c31644940372 (diff)
Fix iptables-save (save everything numerically)
by Thomas Woerner <twoerner@redhat.com>
Diffstat (limited to 'extensions/libipt_LOG.c')
-rw-r--r--extensions/libipt_LOG.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/extensions/libipt_LOG.c b/extensions/libipt_LOG.c
index 290ccf01..27995dcf 100644
--- a/extensions/libipt_LOG.c
+++ b/extensions/libipt_LOG.c
@@ -230,16 +230,8 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target)
if (strcmp(loginfo->prefix, "") != 0)
printf("--log-prefix \"%s\" ", loginfo->prefix);
- if (loginfo->level != LOG_DEFAULT_LEVEL) {
- for (i = 0;
- i < sizeof(ipt_log_names) / sizeof(struct ipt_log_names);
- i++) {
- if (loginfo->level == ipt_log_names[i].level) {
- printf("--log-level %s ", ipt_log_names[i].name);
- break;
- }
- }
- }
+ if (loginfo->level != LOG_DEFAULT_LEVEL)
+ printf("--log-level %d ", loginfo->level);
if (loginfo->logflags & IPT_LOG_TCPSEQ)
printf("--log-tcp-sequence ");