]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IDLETIMER: New xt_target prototype
authorSamuel Ortiz <samuel.ortiz@solidboot.com>
Thu, 13 Jul 2006 10:04:06 +0000 (13:04 +0300)
committerJuha Yrjola <juha.yrjola@solidboot.com>
Fri, 14 Jul 2006 12:20:55 +0000 (15:20 +0300)
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 <samuel.ortiz@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
net/ipv4/netfilter/ipt_IDLETIMER.c

index 9a11466c3d16867eff26bc2580c978f356587a61..16839e3a15ee75e2810041d9fb7d78a51b51f01b 100644 (file)
@@ -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)