Commit af2ee19e authored by Samuel Ortiz's avatar Samuel Ortiz Committed by Juha Yrjola

IDLETIMER: New xt_target prototype

In ipt_IDLETIMER.c, we are using an old prototype for xt_target hooks. We need
to pass one additional argument, a pointer to xt_target.
We also need to specify the targetsize value, otherwise registration fails.
Signed-off-by: default avatarSamuel Ortiz <samuel.ortiz@solidboot.com>
Signed-off-by: default avatarJuha Yrjola <juha.yrjola@solidboot.com>
parent 64929d88
......@@ -206,11 +206,12 @@ static void utimer_fini(void)
* The actual iptables plugin.
*/
static unsigned int ipt_idletimer_target(struct sk_buff **pskb,
const struct net_device *in,
const struct net_device *out,
unsigned int hooknum,
const void *targinfo,
void *userinfo)
const struct net_device *in,
const struct net_device *out,
unsigned int hooknum,
const struct xt_target *xttarget,
const void *targinfo,
void *userinfo)
{
struct ipt_idletimer_info *target = (struct ipt_idletimer_info*) targinfo;
unsigned long expires;
......@@ -227,10 +228,11 @@ static unsigned int ipt_idletimer_target(struct sk_buff **pskb,
}
static int ipt_idletimer_checkentry(const char *tablename,
const void *e,
void *targinfo,
unsigned int targinfosize,
unsigned int hookmask)
const void *e,
const struct xt_target *target,
void *targinfo,
unsigned int targinfosize,
unsigned int hookmask)
{
struct ipt_idletimer_info *info =
(struct ipt_idletimer_info *) targinfo;
......@@ -253,6 +255,7 @@ static struct ipt_target ipt_idletimer = {
.target = ipt_idletimer_target,
.checkentry = ipt_idletimer_checkentry,
.me = THIS_MODULE,
.targetsize = sizeof(struct ipt_idletimer_info),
};
static int __init init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment