: Relax hook check in ipt_CLASSIFY
Subsystems (2)
PATCH 10/14 : Relax hook check in ipt_CLASSIFY
This patch for 2.6 removes the unneccessary restriction to POST_ROUTING from ipt_CLASSIFY. In 2.6, skb->priority is set before any of LOCAL_OUT, FORWARD and POST_ROUTING are hit, so we can remove this restriction.
Author: Patrick McHardy <[email protected]>
--
- Harald Welte <[email protected]> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2004/06/20 22:46:05+02:00 [email protected]
# [NETFILTER]: Relax hook check in ipt_CLASSIFY
#
# net/ipv4/netfilter/ipt_CLASSIFY.c
# 2004/06/20 22:45:56+02:00 [email protected] +7 -5
# [NETFILTER]: Relax hook check in ipt_CLASSIFY
#
net/ipv4/netfilter/ipt_CLASSIFY.c +7 -5
@@ -54,15 +54,17 @@return 0 ; } -if (hook_mask & ~(1 <<NF_IP_POST_ROUTING )) { -printk (KERN_ERR "CLASSIFY: only valid in POST_ROUTING.\n" ); +if (hook_mask & ~((1 <<NF_IP_LOCAL_OUT ) | (1 <<NF_IP_FORWARD ) | + (1 <<NF_IP_POST_ROUTING ))) { +printk (KERN_ERR "CLASSIFY: only valid in LOCAL_OUT, FORWARD " +"and POST_ROUTING.\n" );return 0 ; }if (strcmp (tablename,"mangle" ) !=0 ) { -printk (KERN_WARNING "CLASSIFY: can only be called from " -"\"mangle\" table, not \"%s\".\n" , - tablename); +printk (KERN_ERR "CLASSIFY: can only be called from " +"\"mangle\" table, not \"%s\".\n" , + tablename);return 0 ; }