The main program already zeroes the per-extension data block.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
struct ip6t_ah *ahinfo = (struct ip6t_ah *)m->data;
ahinfo->spis[1] = 0xFFFFFFFF;
- ahinfo->hdrlen = 0;
- ahinfo->hdrres = 0;
}
static int ah_parse(int c, char **argv, int invert, unsigned int *flags,
return i;
}
-static void dst_init(struct xt_entry_match *m)
-{
- struct ip6t_opts *optinfo = (struct ip6t_opts *)m->data;
-
- optinfo->hdrlen = 0;
- optinfo->flags = 0;
- optinfo->invflags = 0;
- optinfo->optsnr = 0;
-}
-
static int dst_parse(int c, char **argv, int invert, unsigned int *flags,
const void *entry, struct xt_entry_match **match)
{
.size = XT_ALIGN(sizeof(struct ip6t_opts)),
.userspacesize = XT_ALIGN(sizeof(struct ip6t_opts)),
.help = dst_help,
- .init = dst_init,
.parse = dst_parse,
.print = dst_print,
.save = dst_save,
{
struct ip6t_frag *fraginfo = (struct ip6t_frag *)m->data;
- fraginfo->ids[0] = 0x0L;
fraginfo->ids[1] = 0xFFFFFFFF;
- fraginfo->hdrlen = 0;
- fraginfo->flags = 0;
- fraginfo->invflags = 0;
}
static int frag_parse(int c, char **argv, int invert, unsigned int *flags,
return i;
}
-static void hbh_init(struct xt_entry_match *m)
-{
- struct ip6t_opts *optinfo = (struct ip6t_opts *)m->data;
-
- optinfo->hdrlen = 0;
- optinfo->flags = 0;
- optinfo->invflags = 0;
- optinfo->optsnr = 0;
-}
-
static int hbh_parse(int c, char **argv, int invert, unsigned int *flags,
const void *entry, struct xt_entry_match **match)
{
.size = XT_ALIGN(sizeof(struct ip6t_opts)),
.userspacesize = XT_ALIGN(sizeof(struct ip6t_opts)),
.help = hbh_help,
- .init = hbh_init,
.parse = hbh_parse,
.print = hbh_print,
.save = hbh_save,
XT_GETOPT_TABLEEND,
};
-static void ipv6header_init(struct xt_entry_match *m)
-{
- struct ip6t_ipv6header_info *info = (struct ip6t_ipv6header_info *)m->data;
-
- info->matchflags = 0x00;
- info->invflags = 0x00;
- info->modeflag = 0x00;
-}
-
static unsigned int
parse_header(const char *flags) {
unsigned int ret = 0;
.size = XT_ALIGN(sizeof(struct ip6t_ipv6header_info)),
.userspacesize = XT_ALIGN(sizeof(struct ip6t_ipv6header_info)),
.help = ipv6header_help,
- .init = ipv6header_init,
.parse = ipv6header_parse,
.final_check = ipv6header_check,
.print = ipv6header_print,
{
struct ip6t_rt *rtinfo = (struct ip6t_rt *)m->data;
- rtinfo->rt_type = 0x0L;
- rtinfo->segsleft[0] = 0x0L;
rtinfo->segsleft[1] = 0xFFFFFFFF;
- rtinfo->hdrlen = 0;
- rtinfo->flags = 0;
- rtinfo->invflags = 0;
- rtinfo->addrnr = 0;
}
static int rt_parse(int c, char **argv, int invert, unsigned int *flags,
XT_GETOPT_TABLEEND,
};
-static void SAME_init(struct xt_entry_target *t)
-{
- struct ipt_same_info *mr = (struct ipt_same_info *)t->data;
-
- /* Set default to 0 */
- mr->rangesize = 0;
- mr->info = 0;
- mr->ipnum = 0;
-
-}
-
/* Parses range of IPs */
static void
parse_to(char *arg, struct nf_nat_range *range)
.size = XT_ALIGN(sizeof(struct ipt_same_info)),
.userspacesize = XT_ALIGN(sizeof(struct ipt_same_info)),
.help = SAME_help,
- .init = SAME_init,
.parse = SAME_parse,
.final_check = SAME_check,
.print = SAME_print,
{
struct xt_nflog_info *info = (struct xt_nflog_info *)t->data;
- info->group = 0;
info->threshold = XT_NFLOG_DEFAULT_THRESHOLD;
}
printf(" %uus", time);
}
-static void
-RATEEST_init(struct xt_entry_target *target)
-{
- interval = 0;
- ewma_log = 0;
-}
-
static int
RATEEST_parse(int c, char **argv, int invert, unsigned int *flags,
const void *entry, struct xt_entry_target **target)
.size = XT_ALIGN(sizeof(struct xt_rateest_target_info)),
.userspacesize = XT_ALIGN(sizeof(struct xt_rateest_target_info)),
.help = RATEEST_help,
- .init = RATEEST_init,
.parse = RATEEST_parse,
.final_check = RATEEST_final_check,
.print = RATEEST_print,
printf(" %-14s strip \"%s\" option\n", w->name, w->desc);
}
-static void tcpoptstrip_tg_init(struct xt_entry_target *t)
-{
- struct xt_tcpoptstrip_target_info *info = (void *)t->data;
-
- /* strictly necessary? play safe for now. */
- memset(info->strip_bmap, 0, sizeof(info->strip_bmap));
-}
-
static void parse_list(struct xt_tcpoptstrip_target_info *info, char *arg)
{
unsigned int option;
.size = XT_ALIGN(sizeof(struct xt_tcpoptstrip_target_info)),
.userspacesize = XT_ALIGN(sizeof(struct xt_tcpoptstrip_target_info)),
.help = tcpoptstrip_tg_help,
- .init = tcpoptstrip_tg_init,
.parse = tcpoptstrip_tg_parse,
.final_check = tcpoptstrip_tg_check,
.print = tcpoptstrip_tg_print,
#define DEBUGP(format, fist...)
#endif
-static void dccp_init(struct xt_entry_match *m)
-{
- struct xt_dccp_info *einfo = (struct xt_dccp_info *)m->data;
-
- memset(einfo, 0, sizeof(struct xt_dccp_info));
-}
-
static void dccp_help(void)
{
printf(
.size = XT_ALIGN(sizeof(struct xt_dccp_info)),
.userspacesize = XT_ALIGN(sizeof(struct xt_dccp_info)),
.help = dccp_help,
- .init = dccp_init,
.parse = dccp_parse,
.print = dccp_print,
.save = dccp_save,
{
struct xt_hashlimit_info *r = (struct xt_hashlimit_info *)m->data;
- r->cfg.mode = 0;
r->cfg.burst = XT_HASHLIMIT_BURST;
r->cfg.gc_interval = XT_HASHLIMIT_GCINTERVAL;
r->cfg.expire = XT_HASHLIMIT_EXPIRE;
int i;
struct xt_sctp_info *einfo = (struct xt_sctp_info *)m->data;
- memset(einfo, 0, sizeof(struct xt_sctp_info));
-
for (i = 0; i < XT_NUM_SCTP_FLAGS; i++) {
einfo->flag_info[i].chunktype = -1;
}
{
struct xt_string_info *i = (struct xt_string_info *) m->data;
- if (i->to_offset == 0)
- i->to_offset = UINT16_MAX;
+ i->to_offset = UINT16_MAX;
}
static void