Re: [RFD] iptables: mangle table obsoletes filter table

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Al Boldi
Date: Thursday, October 11, 2007 - 10:37 pm

Patrick McHardy wrote:

Ok.  I just found out this changed to vger.  But 
netfilter-devel@vger.kernel.org is bouncing me.


Something like this (untested):

--- ipt_REJECT.bak.c    2007-10-12 08:25:17.000000000 +0300
+++ ipt_REJECT.c        2007-10-12 08:31:44.000000000 +0300
@@ -165,6 +165,7 @@ static void send_reset(struct sk_buff *o
 
 static inline void send_unreach(struct sk_buff *skb_in, int code)
 {
+       if (!skb_in->dst) ip_route_me_harder(&skb_in, RTN_UNSPEC);
        icmp_send(skb_in, ICMP_DEST_UNREACH, code, 0);
 }
 
@@ -245,9 +246,6 @@ static struct xt_target ipt_reject_reg =
        .family         = AF_INET,
        .target         = reject,
        .targetsize     = sizeof(struct ipt_reject_info),
-       .table          = "filter",
-       .hooks          = (1 << NF_IP_LOCAL_IN) | (1 << NF_IP_FORWARD) |
-                         (1 << NF_IP_LOCAL_OUT),
        .checkentry     = check,
        .me             = THIS_MODULE,
 };


The problem is that people think they are safe with the filter table, when in 
fact they need the prerouting chain to seal things.  Right now this is only 
possible in the mangle table.



Thanks!

--
Al

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFD] iptables: mangle table obsoletes filter table, Patrick McHardy, (Thu Oct 11, 9:35 pm)
Re: [RFD] iptables: mangle table obsoletes filter table, Al Boldi, (Thu Oct 11, 10:37 pm)
Re: [RFD] iptables: mangle table obsoletes filter table, Jan Engelhardt, (Fri Oct 12, 6:01 am)
Re: [RFD] iptables: mangle table obsoletes filter table, Jan Engelhardt, (Fri Oct 12, 6:39 am)
Re: [RFD] iptables: mangle table obsoletes filter table, Patrick McHardy, (Fri Oct 12, 6:48 am)
Re: [RFD] iptables: mangle table obsoletes filter table, Jan Engelhardt, (Fri Oct 12, 7:02 am)
Re: [RFD] iptables: mangle table obsoletes filter table, Patrick McHardy, (Fri Oct 12, 7:03 am)
Re: [RFD] iptables: mangle table obsoletes filter table, Patrick McHardy, (Fri Oct 12, 4:02 pm)
Re: [RFD] iptables: mangle table obsoletes filter table, Bill Davidsen, (Wed Oct 17, 3:37 pm)
Re: [RFD] iptables: mangle table obsoletes filter table, Bill Davidsen, (Wed Oct 17, 4:24 pm)
Re: [RFD] iptables: mangle table obsoletes filter table, Valdis.Kletnieks, (Fri Oct 19, 9:47 pm)
Re: [RFD] iptables: mangle table obsoletes filter table, Jan Engelhardt, (Sat Oct 20, 4:10 am)
Re: [RFD] iptables: mangle table obsoletes filter table, Valdis.Kletnieks, (Sat Oct 20, 9:53 pm)
Re: [RFD] iptables: mangle table obsoletes filter table, Bill Davidsen, (Tue Oct 23, 3:27 pm)