pknock: only use size-fixated types

Types with variadic size are a no-no.
This commit is contained in:
Jan Engelhardt
2009-09-29 19:12:13 +02:00
parent cee3d25d49
commit d8dc72d151
2 changed files with 6 additions and 6 deletions

View File

@@ -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)

View File

@@ -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 {