]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
pknock: move struct ipt_pknock_crypto to xt_pknock.c
authorJan Engelhardt <jengelh@medozas.de>
Tue, 29 Sep 2009 17:32:18 +0000 (19:32 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Tue, 29 Sep 2009 21:45:28 +0000 (23:45 +0200)
It is only used in xt_pknock.c, and only once, so also make it an
anonymous struct.

extensions/xt_pknock.c
extensions/xt_pknock.h

index a83387888f5647d51e590e0fff6f347cd3f2ab31..6bb13ca0b8195e4533ea324d19b0b98f3dec1569 100644 (file)
@@ -70,7 +70,12 @@ static struct proc_dir_entry *pde = NULL;
 
 static DEFINE_SPINLOCK(list_lock);
 
-static struct ipt_pknock_crypto crypto = {
+static struct {
+       char                            *algo;
+       struct crypto_hash      *tfm;
+       int                                     size;
+       struct hash_desc        desc;
+} crypto = {
        .algo   = "hmac(sha256)",
        .tfm    = NULL,
        .size   = 0
index a798edbdfc2b8bde500fdaf9e894722046af69d3..4b542a482d4f31024ed7facaa7843155fd8060e9 100644 (file)
@@ -74,15 +74,6 @@ struct ipt_pknock_rule {
        unsigned long           max_time; /* max matching time between ports */
 };
 
-#include <linux/crypto.h>
-
-struct ipt_pknock_crypto {
-       char                            *algo;
-       struct crypto_hash      *tfm;
-       int                                     size;
-       struct hash_desc        desc;
-};
-
 struct transport_data {
        uint8_t proto;
        uint16_t        port;   /* destination port */