From af2ee19eb64cede96005ccb25a26db4729256f1b Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Thu, 13 Jul 2006 13:04:06 +0300 Subject: [PATCH] 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: Samuel Ortiz Signed-off-by: Juha Yrjola --- net/ipv4/netfilter/ipt_IDLETIMER.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/net/ipv4/netfilter/ipt_IDLETIMER.c b/net/ipv4/netfilter/ipt_IDLETIMER.c index 9a11466c3d1..16839e3a15e 100644 --- a/net/ipv4/netfilter/ipt_IDLETIMER.c +++ b/net/ipv4/netfilter/ipt_IDLETIMER.c @@ -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) -- 2.41.1