]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
xt_pknock: remove DEBUG definition and disable debug output
authorJeremy Sowden <jeremy@azazel.net>
Sun, 25 Oct 2020 13:15:59 +0000 (14:15 +0100)
committerJan Engelhardt <jengelh@inai.de>
Sun, 25 Oct 2020 14:17:40 +0000 (15:17 +0100)
The DEBUG definition in xt_pknock.h causes a compiler warning if one
adds a DEBUG define to xt_pknock.c to enable pr_debug. Since it only
controls some debugging output in libxt_pknock.c, it would make sense to
move the definition there, but let's just disable the debugging instead.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
extensions/pknock/libxt_pknock.c
extensions/pknock/xt_pknock.h

index 4852e9f25a9e8fd68d3ee324e2b977b690f25706..1cd829333a1d6c1166350a47910c8c576311c548 100644 (file)
@@ -123,7 +123,7 @@ __pknock_parse(int c, char **argv, int invert, unsigned int *flags,
                info->ports_count = parse_ports(optarg, info->port, proto);
                info->option |= XT_PKNOCK_KNOCKPORT;
                *flags |= XT_PKNOCK_KNOCKPORT;
-#if DEBUG
+#ifdef DEBUG
                printf("ports_count: %d\n", info->ports_count);
 #endif
                break;
@@ -162,7 +162,7 @@ __pknock_parse(int c, char **argv, int invert, unsigned int *flags,
                info->rule_name_len = strlen(info->rule_name);
                info->option |= XT_PKNOCK_NAME;
                *flags |= XT_PKNOCK_NAME;
-#if DEBUG
+#ifdef DEBUG
                printf("info->rule_name: %s\n", info->rule_name);
 #endif
                break;
index d44905b44e0dbe419892ca42c6f0a54e8997739b..fb201df49e82201f793f3c86b8f840d3d725e817 100644 (file)
@@ -29,8 +29,6 @@ enum {
        XT_PKNOCK_MAX_PASSWD_LEN = 31,
 };
 
-#define DEBUG 1
-
 struct xt_pknock_mtinfo {
        char rule_name[XT_PKNOCK_MAX_BUF_LEN+1];
        uint32_t                        rule_name_len;