mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-20 19:44:56 +02:00
pknock: move struct ipt_pknock_crypto to xt_pknock.c
It is only used in xt_pknock.c, and only once, so also make it an anonymous struct.
This commit is contained in:
@@ -70,7 +70,12 @@ static struct proc_dir_entry *pde = NULL;
|
|||||||
|
|
||||||
static DEFINE_SPINLOCK(list_lock);
|
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)",
|
.algo = "hmac(sha256)",
|
||||||
.tfm = NULL,
|
.tfm = NULL,
|
||||||
.size = 0
|
.size = 0
|
||||||
|
@@ -74,15 +74,6 @@ struct ipt_pknock_rule {
|
|||||||
unsigned long max_time; /* max matching time between ports */
|
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 {
|
struct transport_data {
|
||||||
uint8_t proto;
|
uint8_t proto;
|
||||||
uint16_t port; /* destination port */
|
uint16_t port; /* destination port */
|
||||||
|
Reference in New Issue
Block a user