2.5.3-pre1 build error and possible fix for net/ipv4/netfilter/ip_fw_compat_redir.c

Steven Cole (elenstev@mesatop.com)
Thu, 17 Jan 2002 09:58:15 -0700


I got the following error building 2.5.3-pre1.

ip_fw_compat_redir.c: In function `check_for_redirect':
ip_fw_compat_redir.c:274: too many arguments to function `add_timer'
ip_fw_compat_redir.c: In function `check_for_unredirect':
ip_fw_compat_redir.c:300: too many arguments to function `add_timer'
make[3]: *** [ip_fw_compat_redir.o] Error 1

Here is a proposed fix. I looked at how add_timer was used earlier in the file.

Steven

--- linux/net/ipv4/netfilter/ip_fw_compat_redir.c.original Tue Jan 15 14:35:45 2002
+++ linux/net/ipv4/netfilter/ip_fw_compat_redir.c Thu Jan 17 09:40:58 2002
@@ -270,8 +270,10 @@
if (redir) {
DEBUGP("Doing tcp redirect again.\n");
do_tcp_redir(skb, redir);
- if (del_timer(&redir->destroyme))
- add_timer(&redir->destroyme, jiffies + REDIR_TIMEOUT);
+ if (del_timer(&redir->destroyme)) {
+ redir->destroyme.expires = jiffies + REDIR_TIMEOUT;
+ add_timer(&redir->destroyme);
+ }
}
UNLOCK_BH(&redir_lock);
}
@@ -296,8 +298,10 @@
if (redir) {
DEBUGP("Doing tcp unredirect.\n");
do_tcp_unredir(skb, redir);
- if (del_timer(&redir->destroyme))
- add_timer(&redir->destroyme, jiffies + REDIR_TIMEOUT);
+ if (del_timer(&redir->destroyme)) {
+ redir->destroyme.expires = jiffies + REDIR_TIMEOUT;
+ add_timer(&redir->destroyme);
+ }
}
UNLOCK_BH(&redir_lock);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/