mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 21:25:12 +02:00
pknock: only use size-fixated types
Types with variadic size are a no-no.
This commit is contained in:
@@ -296,7 +296,7 @@ static void pknock_print(const void *ip,
|
||||
printf(" ");
|
||||
}
|
||||
if (info->option & IPT_PKNOCK_TIME)
|
||||
printf("time %ld ", info->max_time);
|
||||
printf("time %ld ", (long)info->max_time);
|
||||
if (info->option & IPT_PKNOCK_NAME)
|
||||
printf("name %s ", info->rule_name);
|
||||
if (info->option & IPT_PKNOCK_OPENSECRET)
|
||||
@@ -318,7 +318,7 @@ static void pknock_save(const void *ip, const struct xt_entry_match *match)
|
||||
printf(" ");
|
||||
}
|
||||
if (info->option & IPT_PKNOCK_TIME)
|
||||
printf("--time %ld ", info->max_time);
|
||||
printf("--time %ld ", (long)info->max_time);
|
||||
if (info->option & IPT_PKNOCK_NAME)
|
||||
printf("--name %s ", info->rule_name);
|
||||
if (info->option & IPT_PKNOCK_OPENSECRET)
|
||||
|
@@ -29,15 +29,15 @@
|
||||
|
||||
struct ipt_pknock {
|
||||
char rule_name[IPT_PKNOCK_MAX_BUF_LEN + 1];
|
||||
int rule_name_len;
|
||||
uint32_t rule_name_len;
|
||||
char open_secret[IPT_PKNOCK_MAX_PASSWD_LEN + 1];
|
||||
int open_secret_len;
|
||||
uint32_t open_secret_len;
|
||||
char close_secret[IPT_PKNOCK_MAX_PASSWD_LEN + 1];
|
||||
int close_secret_len;
|
||||
uint32_t close_secret_len;
|
||||
uint8_t option; /* --time, --knock-port, ... */
|
||||
uint8_t ports_count; /* number of ports */
|
||||
uint16_t port[IPT_PKNOCK_MAX_PORTS]; /* port[,port,port,...] */
|
||||
unsigned long max_time; /* max matching time between ports */
|
||||
uint32_t max_time; /* max matching time between ports */
|
||||
};
|
||||
|
||||
struct ipt_pknock_nl_msg {
|
||||
|
Reference in New Issue
Block a user