2002-01-17 16:58:44

by Steven Cole

[permalink] [raw]
Subject: 2.5.3-pre1 build error and possible fix for net/ipv4/netfilter/ip_fw_compat_redir.c

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);
}


2002-01-17 21:15:20

by David Miller

[permalink] [raw]
Subject: Re: 2.5.3-pre1 build error and possible fix for net/ipv4/netfilter/ip_fw_compat_redir.c


Yes, this is the fix I've already sent to Linus.