]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Kill NFC_* stuff in iptables (Pablo Neira <pablo@eurodev.net>)
authorPablo Neira <pablo@eurodev.net>
Mon, 14 Feb 2005 13:13:04 +0000 (13:13 +0000)
committerPatrick McHardy <kaber@trash.net>
Mon, 14 Feb 2005 13:13:04 +0000 (13:13 +0000)
Fixes build with conntrack event patch for 2.6

87 files changed:
extensions/libip6t_LOG.c
extensions/libip6t_REJECT.c
extensions/libip6t_condition.c
extensions/libip6t_eui64.c
extensions/libip6t_fuzzy.c
extensions/libip6t_hl.c
extensions/libip6t_icmpv6.c
extensions/libip6t_ipv6header.c
extensions/libip6t_length.c
extensions/libip6t_limit.c
extensions/libip6t_mac.c
extensions/libip6t_mark.c
extensions/libip6t_multiport.c
extensions/libip6t_nth.c
extensions/libip6t_owner.c
extensions/libip6t_random.c
extensions/libip6t_tcp.c
extensions/libip6t_udp.c
extensions/libipt_BALANCE.c
extensions/libipt_DNAT.c
extensions/libipt_IPMARK.c
extensions/libipt_IPV4OPTSSTRIP.c
extensions/libipt_LOG.c
extensions/libipt_MASQUERADE.c
extensions/libipt_NETLINK.c
extensions/libipt_NETMAP.c
extensions/libipt_POOL.c
extensions/libipt_REDIRECT.c
extensions/libipt_REJECT.c
extensions/libipt_SAME.c
extensions/libipt_SET.c
extensions/libipt_SNAT.c
extensions/libipt_TARPIT.c
extensions/libipt_TCPLAG.c
extensions/libipt_ULOG.c
extensions/libipt_account.c
extensions/libipt_addrtype.c
extensions/libipt_childlevel.c
extensions/libipt_comment.c
extensions/libipt_condition.c
extensions/libipt_connbytes.c
extensions/libipt_connlimit.c
extensions/libipt_connrate.c
extensions/libipt_conntrack.c
extensions/libipt_dscp.c
extensions/libipt_dstlimit.c
extensions/libipt_ecn.c
extensions/libipt_fuzzy.c
extensions/libipt_hashlimit.c
extensions/libipt_helper.c
extensions/libipt_icmp.c
extensions/libipt_iprange.c
extensions/libipt_ipv4options.c
extensions/libipt_length.c
extensions/libipt_limit.c
extensions/libipt_mac.c
extensions/libipt_mark.c
extensions/libipt_mport.c
extensions/libipt_multiport.c
extensions/libipt_nth.c
extensions/libipt_osf.c
extensions/libipt_owner.c
extensions/libipt_pkttype.c
extensions/libipt_pool.c
extensions/libipt_psd.c
extensions/libipt_quota.c
extensions/libipt_random.c
extensions/libipt_realm.c
extensions/libipt_recent.c
extensions/libipt_record_rpc.c
extensions/libipt_rpc.c
extensions/libipt_sctp.c
extensions/libipt_set.c
extensions/libipt_state.c
extensions/libipt_string.c
extensions/libipt_tcp.c
extensions/libipt_tcpmss.c
extensions/libipt_time.c
extensions/libipt_tos.c
extensions/libipt_ttl.c
extensions/libipt_u32.c
extensions/libipt_udp.c
extensions/libipt_unclean.c
ip6tables.c
iptables.c
libiptc/libip4tc.c
libiptc/libip6tc.c

index 74655af2baf38d59f3e38e76ed361f8e1c2b81ee..3cde0eece1964815f4e3d341498e680a0cbe2754 100644 (file)
@@ -42,8 +42,6 @@ init(struct ip6t_entry_target *t, unsigned int *nfcache)
 
        loginfo->level = LOG_DEFAULT_LEVEL;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 struct ip6t_log_names {
index 702f6b3de77d25fc12d2271347eaa8fb9d64a12f..879716b0c12a2435ca35933c227d72adc9ed045a 100644 (file)
@@ -79,8 +79,6 @@ init(struct ip6t_entry_target *t, unsigned int *nfcache)
        /* default */
        reject->with = IP6T_ICMP6_PORT_UNREACH;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* Function which parses command options; returns true if it
index f58b3bc3629594410e610b45f85e92333c4ae818..0e94c39e11902dbdb8489f525912b0800ed5060a 100644 (file)
@@ -24,14 +24,6 @@ static struct option opts[] = {
        { .name = 0 }
 };
 
-
-static void
-init(struct ip6t_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_UNKNOWN;
-}
-
-
 static int
 parse(int c, char **argv, int invert, unsigned int *flags,
       const struct ip6t_entry *entry, unsigned int *nfcache,
@@ -99,7 +91,6 @@ static struct ip6tables_match condition = {
        .size = IP6T_ALIGN(sizeof(struct condition6_info)),
        .userspacesize = IP6T_ALIGN(sizeof(struct condition6_info)),
        .help = &help,
-       .init = &init,
        .parse = &parse,
        .final_check = &final_check,
        .print = &print,
index f8962c60c7aff2f7c889d996972b7ad2146d1ec3..c74b04dbae94fb064ac6d10ccf2368b3e50338ea 100644 (file)
@@ -26,14 +26,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ip6t_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 /* Function which parses command options; returns true if it
    ate an option */
 static int
@@ -71,7 +63,6 @@ static struct ip6tables_match eui64 = {
        .size           = IP6T_ALIGN(sizeof(int)),
        .userspacesize  = IP6T_ALIGN(sizeof(int)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 65c2acfd52e86710da859182739785738b16137f..749ddc8f1b2704aadae2f450c002b4880b826284 100644 (file)
@@ -44,8 +44,6 @@ static void
 init(struct ip6t_entry_match *m, unsigned int *nfcache)
 {
        struct ip6t_fuzzy_info *presentinfo = (struct ip6t_fuzzy_info *)(m)->data;
-       *nfcache |= NFC_UNKNOWN;
-
        /*
         * Default rates ( I'll improve this very soon with something based
         * on real statistics of the running machine ) .
index 2d068b8a08eb031b41b8c00a8773cdcaf617f31a..208da33f0ba3c628e404a6c1f4e8728271ee70bf 100644 (file)
@@ -25,12 +25,6 @@ static void help(void)
 , IPTABLES_VERSION);
 }
 
-static void init(struct ip6t_entry_match *m, unsigned int *nfcache)
-{
-       /* caching not yet implemented */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static int parse(int c, char **argv, int invert, unsigned int *flags,
                const struct ip6t_entry *entry, unsigned int *nfcache,
                struct ip6t_entry_match **match)
@@ -141,7 +135,6 @@ struct ip6tables_match hl = {
        .size          = IP6T_ALIGN(sizeof(struct ip6t_hl_info)),
        .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_hl_info)),
        .help          = &help,
-       .init          = &init,
        .parse         = &parse,
        .final_check   = &final_check,
        .print         = &print,
index 62ee90f5a847d5855c9480fe159f505a29455cdb..a29bb38973542caae0f3501daff9e6b142e6dbaf 100644 (file)
@@ -90,7 +90,7 @@ static struct option opts[] = {
        {0}
 };
 
-static unsigned int
+static void
 parse_icmpv6(const char *icmpv6type, u_int8_t *type, u_int8_t code[])
 {
        unsigned int limit = sizeof(icmpv6_codes)/sizeof(struct icmpv6_names);
@@ -141,10 +141,6 @@ parse_icmpv6(const char *icmpv6type, u_int8_t *type, u_int8_t code[])
                        code[1] = 0xFF;
                }
        }
-
-       if (code[0] == 0 && code[1] == 0xFF)
-               return NFC_IP6_SRC_PT;
-       else return NFC_IP6_SRC_PT | NFC_IP6_DST_PT;
 }
 
 /* Initialize the match. */
@@ -169,9 +165,8 @@ parse(int c, char **argv, int invert, unsigned int *flags,
        switch (c) {
        case '1':
                check_inverse(optarg, &invert, &optind, 0);
-               *nfcache |= parse_icmpv6(argv[optind-1],
-                                      &icmpv6info->type,
-                                      icmpv6info->code);
+               parse_icmpv6(argv[optind-1], &icmpv6info->type, 
+                            icmpv6info->code);
                if (invert)
                        icmpv6info->invflags |= IP6T_ICMP_INV;
                break;
index a06ced6e2d41a0471068a2f51cad923014a2c8e5..a260e6e1ebe59e8dd8477ee31910411e60486c7a 100644 (file)
@@ -162,8 +162,6 @@ init(struct ip6t_entry_match *m, unsigned int *nfcache)
        info->matchflags = 0x00;
        info->invflags = 0x00;
        info->modeflag = 0x00;
-       /* No caching (yet) */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 static unsigned int
index 0d531aea2e96f9710ecec2930db18b76714d7404..c944c65e093674de97a1362100394cc26814b928 100644 (file)
@@ -26,13 +26,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ip6t_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static u_int16_t
 parse_length(const char *s)
 {
@@ -146,7 +139,6 @@ struct ip6tables_match length = {
        .size           = IP6T_ALIGN(sizeof(struct ip6t_length_info)),
        .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_length_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 927b6d1488d9534a1d354cb183122c58215c9e1e..6c88ee1cea928ba49e5266e0fbf727c26438d671 100644 (file)
@@ -81,8 +81,6 @@ init(struct ip6t_entry_match *m, unsigned int *nfcache)
        parse_rate(IP6T_LIMIT_AVG, &r->avg);
        r->burst = IP6T_LIMIT_BURST;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* FIXME: handle overflow:
index 353f746137e48ac31a64b2b67f52931d842ef823..e47f21f6a2375a2d1ece91f0d31b669a826e7496 100644 (file)
@@ -28,14 +28,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ip6t_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static void
 parse_mac(const char *mac, struct ip6t_mac_info *info)
 {
@@ -134,7 +126,6 @@ static struct ip6tables_match mac = {
        .size           = IP6T_ALIGN(sizeof(struct ip6t_mac_info)),
        .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_mac_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 54a279e2ef18ea06b72de5f2ef658da130e726b2..b831cfe47596f145265df2439ce29919fc1c62c3 100644 (file)
@@ -25,14 +25,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ip6t_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this. */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 /* Function which parses command options; returns true if it
    ate an option */
 static int
@@ -137,7 +129,6 @@ static struct ip6tables_match mark = {
        .size           = IP6T_ALIGN(sizeof(struct ip6t_mark_info)),
        .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_mark_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index c12e1bdba7507a0476833cab7fbfaa72e4297690..013241b227f95f13c63aa6a5e49f1ac67208de55 100644 (file)
@@ -117,7 +117,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                multiinfo->count = parse_multi_ports(argv[optind-1],
                                                     multiinfo->ports, proto);
                multiinfo->flags = IP6T_MULTIPORT_SOURCE;
-               *nfcache |= NFC_IP6_SRC_PT;
                break;
 
        case '2':
@@ -126,7 +125,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                multiinfo->count = parse_multi_ports(argv[optind-1],
                                                     multiinfo->ports, proto);
                multiinfo->flags = IP6T_MULTIPORT_DESTINATION;
-               *nfcache |= NFC_IP6_DST_PT;
                break;
 
        case '3':
@@ -135,7 +133,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                multiinfo->count = parse_multi_ports(argv[optind-1],
                                                     multiinfo->ports, proto);
                multiinfo->flags = IP6T_MULTIPORT_EITHER;
-               *nfcache |= NFC_IP6_SRC_PT | NFC_IP6_DST_PT;
                break;
 
        default:
index 26eeb26eb53fdac588af00be68c8041b69b87b5c..19b13f796d4ae539a87e3dcada64c1e3adc87253 100644 (file)
@@ -50,13 +50,6 @@ static struct option opts[] = {
        { 0 }
 };
 
-/* Initialize the target. */
-static void
-init(struct ip6t_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_UNKNOWN;
-}
-
 #define IP6T_NTH_OPT_EVERY     0x01
 #define IP6T_NTH_OPT_NOT_EVERY 0x02
 #define IP6T_NTH_OPT_START     0x04
@@ -223,7 +216,6 @@ struct ip6tables_match nth = {
        .size           = IP6T_ALIGN(sizeof(struct ip6t_nth_info)),
        .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_nth_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index ec5c4fd5ab0acf0974758633ea43280af925029d..6f27ebb62950e5d1038c59254085d9a8789c5ecf 100644 (file)
@@ -47,14 +47,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ip6t_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this. */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 /* Function which parses command options; returns true if it
    ate an option */
 static int
@@ -243,7 +235,6 @@ static struct ip6tables_match owner = {
        .size           = IP6T_ALIGN(sizeof(struct ip6t_owner_info)),
        .userspacesize  = IP6T_ALIGN(sizeof(struct ip6t_owner_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index f32c009a76fd18bbcaf62a577b50051998b080b7..d34a230819154d4f410d4707a39e24d34f923efa 100644 (file)
@@ -52,7 +52,6 @@ static void
 init(struct ip6t_entry_match *m, unsigned int *nfcache)
 {
        struct ip6t_rand_info *randinfo = (struct ip6t_rand_info *)(m)->data;
-       *nfcache |= NFC_UNKNOWN;
 
        /* We assign the average to be 50 which is our default value */
        /* 50 * 2.55 = 128 */
index 5c6659422025c0a0bff1390e3e43fad9d36c6a68..a0491280260729c2729d51cf117234ced01603e4 100644 (file)
@@ -187,7 +187,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                if (invert)
                        tcpinfo->invflags |= IP6T_TCP_INV_SRCPT;
                *flags |= TCP_SRC_PORTS;
-               *nfcache |= NFC_IP6_SRC_PT;
                break;
 
        case '2':
@@ -199,7 +198,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                if (invert)
                        tcpinfo->invflags |= IP6T_TCP_INV_DSTPT;
                *flags |= TCP_DST_PORTS;
-               *nfcache |= NFC_IP6_DST_PT;
                break;
 
        case '3':
@@ -209,7 +207,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                                   " allowed");
                parse_tcp_flags(tcpinfo, "SYN,RST,ACK", "SYN", invert);
                *flags |= TCP_FLAGS;
-               *nfcache |= NFC_IP6_TCPFLAGS;
                break;
 
        case '4':
@@ -228,7 +225,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                                invert);
                optind++;
                *flags |= TCP_FLAGS;
-               *nfcache |= NFC_IP6_TCPFLAGS;
                break;
 
        case '5':
@@ -240,7 +236,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                if (invert)
                        tcpinfo->invflags |= IP6T_TCP_INV_OPTION;
                *flags |= TCP_OPTION;
-               *nfcache |= NFC_IP6_PROTO_UNKNOWN;
                break;
 
        default:
index 73e1d1e9286a339cb0e00c3ca3c71cedd157a235..842581d95e9f1e4b3d77a91f2b02fb3fce9d9bdc 100644 (file)
@@ -109,7 +109,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                if (invert)
                        udpinfo->invflags |= IP6T_UDP_INV_SRCPT;
                *flags |= UDP_SRC_PORTS;
-               *nfcache |= NFC_IP6_SRC_PT;
                break;
 
        case '2':
@@ -121,7 +120,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                if (invert)
                        udpinfo->invflags |= IP6T_UDP_INV_DSTPT;
                *flags |= UDP_DST_PORTS;
-               *nfcache |= NFC_IP6_DST_PT;
                break;
 
        default:
index 1b97ea2e80d361d7a3afa2be286f0317eff301ab..6d6392f895fc4cdb55195386f2e8953b173d096d 100644 (file)
@@ -35,8 +35,6 @@ init(struct ipt_entry_target *t, unsigned int *nfcache)
        /* Actually, it's 0, but it's ignored at the moment. */
        mr->rangesize = 1;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* Parses range of IPs */
index 96a6e6b522eb1c30e11961120c5f87f346c98a9e..94d04e8e8860dd13416f9aebe35475f70bbc3037 100644 (file)
@@ -33,14 +33,6 @@ static struct option opts[] = {
        { 0 }
 };
 
-/* Initialize the target. */
-static void
-init(struct ipt_entry_target *t, unsigned int *nfcache)
-{
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static struct ipt_natinfo *
 append_range(struct ipt_natinfo *info, const struct ip_nat_range *range)
 {
@@ -236,7 +228,6 @@ static struct iptables_target dnat = {
        .size           = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 3a557fe7b751c9c4f3faa613b42f2eaaa7982e52..3e0942de4d8c97064518776b3dca4d19ae183050 100644 (file)
@@ -53,7 +53,6 @@ init(struct ipt_entry_target *t, unsigned int *nfcache)
        ipmarkinfo->andmask=0xffffffff;
        ipmarkinfo->ormask=0;
 
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* Function which parses command options; returns true if it
index c154ef53b35b016a136bf84563db1d5c2bb3edaf..d0305e63687ef12101bbfaf85e0b6f659c4a79fb 100644 (file)
 #include <iptables.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
 
-static void init(struct ipt_entry_target *t, unsigned int *nfcache) 
-{
-        *nfcache |= NFC_UNKNOWN;
-}
-
 static void help(void) 
 {
        printf("IPV4OPTSSTRIP v%s target takes no option !! Make sure you use it in the mangle table.\n",
@@ -66,7 +61,6 @@ static struct iptables_target IPV4OPTSSTRIP = {
        .size           = IPT_ALIGN(0),
        .userspacesize  = IPT_ALIGN(0),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 39d6fb0b95bceae3fffa2488180e157699edac28..74d6555209e4a0677861a548c019732eb0daeae5 100644 (file)
@@ -50,8 +50,6 @@ init(struct ipt_entry_target *t, unsigned int *nfcache)
 
        loginfo->level = LOG_DEFAULT_LEVEL;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 struct ipt_log_names {
index 31af120342da2bf8ede735bc7ff191710208eef5..b661012e7f55949afacc507bb50ac7b106c27264 100644 (file)
@@ -33,8 +33,6 @@ init(struct ipt_entry_target *t, unsigned int *nfcache)
        /* Actually, it's 0, but it's ignored at the moment. */
        mr->rangesize = 1;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* Parses ports */
index 9cc190c2f36cd70d38e673c7f63bd15a8eb8d0ac..403c4139d7877a9ec9707b984043fcf861caaacf 100644 (file)
@@ -32,7 +32,6 @@ static void init(struct ipt_entry_target *t, unsigned int *nfcache)
        
        nld->flags=0;
        
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* Parse command options */
index 81d0e5c6a96f5b5a215c9acd2f55bcb32f6cab7e..a39c731e0b075092b770377ba6283f65bd213d7a 100644 (file)
@@ -63,8 +63,6 @@ init(struct ipt_entry_target *t, unsigned int *nfcache)
        /* Actually, it's 0, but it's ignored at the moment. */
        mr->rangesize = 1;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* Parses network address */
index 0ce9f20940bc26bb0c03ded3eb68b560dffcad5c..95756bc53f60d7ada02f0a4579f9795c59da8c5a 100644 (file)
@@ -51,8 +51,6 @@ init(struct ipt_entry_target *target, unsigned int *nfcache)
        ipi->src = ipi->dst = IP_POOL_NONE;
        ipi->flags = 0;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* Function which parses command options; returns true if it
index b40cb496f627487daa853247f8fee3204afb99a6..1395f62ea0b95cd9d0d4c2d546cff5bb05738204 100644 (file)
@@ -33,8 +33,6 @@ init(struct ipt_entry_target *t, unsigned int *nfcache)
        /* Actually, it's 0, but it's ignored at the moment. */
        mr->rangesize = 1;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* Parses ports */
index 4b08e4531df038beedd24b368e3add0df3cd11bc..f98233152c0c909f9ef5625f1280d541929e165c 100644 (file)
@@ -94,8 +94,6 @@ init(struct ipt_entry_target *t, unsigned int *nfcache)
        /* default */
        reject->with = IPT_ICMP_PORT_UNREACHABLE;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* Function which parses command options; returns true if it
index 654550173f2407e0c6f61c69b85c79a1c2371ead..4eda2237723768b3ab617e5fe3baa385e1d0edf2 100644 (file)
@@ -43,8 +43,6 @@ init(struct ipt_entry_target *t, unsigned int *nfcache)
        mr->info = 0;
        mr->ipnum = 0;
        
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* Parses range of IPs */
index 2cf483c47c0f270ef0d7ff0ee648662bf2653014..91d1a47adecd269ff981de989901403cb679877e 100644 (file)
@@ -51,8 +51,6 @@ static void init(struct ipt_entry_target *target, unsigned int *nfcache)
        info->add_set.index =
        info->del_set.index = IP_SET_INVALID_ID;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 static void
index f10d0418e2ff8d847dbbda7283fde6eb777502bd..7510f6e7f445f1e8c768f6ce3eaedb321e7c7a85 100644 (file)
@@ -33,14 +33,6 @@ static struct option opts[] = {
        { 0 }
 };
 
-/* Initialize the target. */
-static void
-init(struct ipt_entry_target *t, unsigned int *nfcache)
-{
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static struct ipt_natinfo *
 append_range(struct ipt_natinfo *info, const struct ip_nat_range *range)
 {
@@ -236,7 +228,6 @@ static struct iptables_target snat = {
        .size           = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ip_nat_multi_range)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 1d1b0639ab96579b050e602753065c9d9f4ecba3..b12cbc2ccec8d015facd2f8729f3e11953f63f7c 100644 (file)
@@ -15,13 +15,6 @@ static struct option opts[] = {
        { 0 }
 };
 
-static void
-init(struct ipt_entry_target *t, unsigned int *nfcache)
-{
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static int
 parse(int c, char **argv, int invert, unsigned int *flags,
       const struct ipt_entry *entry,
@@ -52,7 +45,6 @@ static struct iptables_target tarpit = {
        .size           = IPT_ALIGN(0),
        .userspacesize  = IPT_ALIGN(0),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 27361e7c5a217937ded7dc2d8b71b50302499e13..b6166c0062a0f0476523093b1c785dc489c98eab 100644 (file)
@@ -70,18 +70,6 @@ static const struct option opts[] =
  * our own private data structure (which is at t->data).
  * Probably we could fiddle with t->tflags too but there is
  * no great advantage in doing so.
- * 
- * TODO: Find documentation for the above flags which
- *       can be ored into nfcache...
- *
- * NFC_IP6_DST_PT
- * NFC_IP6_PROTO_UNKNOWN
- * NFC_IP6_SRC_PT
- * NFC_IP6_TCPFLAGS
- * NFC_IP_DST_PT
- * NFC_IP_SRC_PT
- * NFC_IP_TOS
- * NFC_UNKNOWN             -- This one seems safest
  */
 static void init( struct ipt_entry_target *t, unsigned int *nfcache )
 {
@@ -89,7 +77,6 @@ static void init( struct ipt_entry_target *t, unsigned int *nfcache )
        memset( el, 0, sizeof( struct ipt_tcplag ));
        el->level = 4; /* Default to warning level */
        strcpy( el->prefix, "TCPLAG:" ); /* Give a reasonable default prefix */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /*
index e0731416383f74207413ebd6d16289c48258f47a..81e0aea99de3ad06bcce55e5923d279a4acb7c7f 100644 (file)
@@ -60,8 +60,6 @@ static void init(struct ipt_entry_target *t, unsigned int *nfcache)
        loginfo->nl_group = ULOG_DEFAULT_NLGROUP;
        loginfo->qthreshold = ULOG_DEFAULT_QTHRESHOLD;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 #define IPT_LOG_OPT_NLGROUP 0x01
index 86af85d1c0bdef722a69e10e0dd58bc7b7ee45f5..d049a03df7ffe775b147f6ea0e844eededfc35f5 100644 (file)
@@ -168,7 +168,6 @@ static void init(struct ipt_entry_match *match,
        
        struct t_ipt_account_info *info = (struct t_ipt_account_info *)(match)->data;
 
-       *nfcache |= NFC_UNKNOWN;
 
        /* set default table name to DEFAULT */
        strncpy(info->name, "DEFAULT", IPT_ACCOUNT_NAME_LEN);
index 9a82cc5cdc905457bc331f8c6db50487798935e4..d8e192966c547f33182b92fc0f166aac5afb037a 100644 (file)
@@ -48,12 +48,6 @@ static void help(void)
        help_types();
 }
 
-static void init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* caching not yet implemented */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static int
 parse_type(const char *name, size_t strlen, u_int16_t *mask)
 {
@@ -199,7 +193,6 @@ struct iptables_match addrtype = {
        .size           = IPT_ALIGN(sizeof(struct ipt_addrtype_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_addrtype_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index bc9f0ad99dec28a0bc2d5b0371b14319e70efdbb..1018c9e004d713dbb448de27b79ccc2b5d3886fe 100644 (file)
@@ -39,12 +39,6 @@ static struct option opts[] = {
        { .name = 0 }
 };
 
-/* Initialize the match. */
-static void init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_UNKNOWN;
-}
-
 /* Function which parses command options; returns true if it ate an option */
 static int parse(int c, char **argv, int invert, unsigned int *flags,
       const struct ipt_entry *entry, unsigned int *nfcache,
@@ -108,7 +102,6 @@ static struct iptables_match childlevel = {
        .size           = IPT_ALIGN(sizeof(struct ipt_childlevel_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_childlevel_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 253b267f8711aa844b95c5eb128b638041bcc506..c543fc69dfda9d5f6a308b1a2efcfb9cff697821 100644 (file)
@@ -29,13 +29,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static void
 parse_comment(const unsigned char *s, struct ipt_comment_info *info)
 {      
@@ -113,7 +106,6 @@ static struct iptables_match comment = {
     .size              = IPT_ALIGN(sizeof(struct ipt_comment_info)),
     .userspacesize     = IPT_ALIGN(sizeof(struct ipt_comment_info)),
     .help              = &help,
-    .init              = &init,
     .parse             = &parse,
     .final_check       = &final_check,
     .print             = &print,
index 553739d06d2611c097172b254149aa5920285c59..16558fe6979e836c0df0323545ae9e68cce12783 100644 (file)
@@ -24,14 +24,6 @@ static struct option opts[] = {
        { .name = 0 }
 };
 
-
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_UNKNOWN;
-}
-
-
 static int
 parse(int c, char **argv, int invert, unsigned int *flags,
       const struct ipt_entry *entry, unsigned int *nfcache,
@@ -99,7 +91,6 @@ static struct iptables_match condition = {
        .size           = IPT_ALIGN(sizeof(struct condition_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct condition_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 2d61a4af8694f41111bb075e0fc8b9073a807f32..2f53bac5b3b3bc701bf7384b61a4d53efbdfb904 100644 (file)
@@ -27,14 +27,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static void
 parse_range(const char *arg, struct ipt_connbytes_info *si)
 {
@@ -199,7 +191,6 @@ static struct iptables_match state = {
        .size           = IPT_ALIGN(sizeof(struct ipt_connbytes_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_connbytes_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 54f021127ba2d0caccb98153fc41f7f2a0f4a29b..17b4d13b8051b930136fcc5786056b747edfa3ee 100644 (file)
@@ -26,14 +26,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 /* Function which parses command options; returns true if it
    ate an option */
 static int
@@ -127,7 +119,6 @@ static struct iptables_match connlimit = {
        .size           = IPT_ALIGN(sizeof(struct ipt_connlimit_info)),
        .userspacesize  = offsetof(struct ipt_connlimit_info,data),
        .help           = help,
-       .init           = init,
        .parse          = parse,
        .final_check    = final_check,
        .print          = print,
index 3c76a70d7d6654dd214a601b06cec0f1574a4508..47c5fcbb55d85397c6705afd59bf3153ffe5892a 100644 (file)
@@ -34,14 +34,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* caching not yet implemented */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static u_int32_t
 parse_value(const char *arg, u_int32_t def)
 {
@@ -174,7 +166,6 @@ static struct iptables_match state = {
        .size           = IPT_ALIGN(sizeof(struct ipt_connrate_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_connrate_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 6ec77dc4e0a2f31c11339489e7dd6f6dbd4c1e91..5521684842cbf29aae60155dca492af90c9df62d 100644 (file)
@@ -56,14 +56,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static int
 parse_state(const char *state, size_t strlen, struct ipt_conntrack_info *sinfo)
 {
@@ -538,7 +530,6 @@ static struct iptables_match conntrack = {
        .size           = IPT_ALIGN(sizeof(struct ipt_conntrack_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_conntrack_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index b4e8b52691dd0b69950a4a1aca44aa3429893394..4520a6a7e9e381024e591e552b3a3f64ed61ec84 100644 (file)
 /* This is evil, but it's my code - HW*/
 #include "libipt_dscp_helper.c"
 
-static void init(struct ipt_entry_match *m, unsigned int *nfcache) 
-{
-       *nfcache |= NFC_IP_TOS;
-}
-
 static void help(void) 
 {
        printf(
@@ -164,7 +159,6 @@ static struct iptables_match dscp = {
        .size           = IPT_ALIGN(sizeof(struct ipt_dscp_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_dscp_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 0d4dc09fc77612bcef194680b2722328ab18a958..3f3b6330d153181a266556420225326b3a9bc99a 100644 (file)
@@ -105,8 +105,6 @@ init(struct ipt_entry_match *m, unsigned int *nfcache)
        r->cfg.gc_interval = IPT_DSTLIMIT_GCINTERVAL;
        r->cfg.expire = IPT_DSTLIMIT_EXPIRE;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 #define PARAM_LIMIT            0x00000001
index d7b7f3b16dfef6fbc965c6c972145aea6d93ffa2..97e839da5539101badf39382b93616854050fe42 100644 (file)
 #include <linux/netfilter_ipv4/ip_tables.h>
 #include <linux/netfilter_ipv4/ipt_ecn.h>
 
-static void init(struct ipt_entry_match *m, unsigned int *nfcache) 
-{
-       *nfcache |= NFC_IP_TOS;
-}
-
 static void help(void) 
 {
        printf(
@@ -163,7 +158,6 @@ struct iptables_match ecn
     .size          = IPT_ALIGN(sizeof(struct ipt_ecn_info)),
     .userspacesize = IPT_ALIGN(sizeof(struct ipt_ecn_info)),
     .help          = &help,
-    .init          = &init,
     .parse         = &parse,
     .final_check   = &final_check,
     .print         = &print,
index 40e071d4fd838532e36f5693117d2ce2d8152e8a..d574db8a5a87b3bd1c49c49088b78fabb47593b5 100644 (file)
@@ -43,7 +43,6 @@ static void
 init(struct ipt_entry_match *m, unsigned int *nfcache)
 {
        struct ipt_fuzzy_info *presentinfo = (struct ipt_fuzzy_info *)(m)->data;
-       *nfcache |= NFC_UNKNOWN;
 
        /*
         * Default rates ( I'll improve this very soon with something based 
index 1df36b4cbc604352beb7f3e6b0323f01debed725..6fb0eccb594ef668792f940ce57e0ee935e7ad6b 100644 (file)
@@ -104,8 +104,6 @@ init(struct ipt_entry_match *m, unsigned int *nfcache)
        r->cfg.gc_interval = IPT_HASHLIMIT_GCINTERVAL;
        r->cfg.expire = IPT_HASHLIMIT_EXPIRE;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 
index 10b39d74423ae6e7781f103b61e0eb90b801e0c7..7c9f3e3c6400943f56f59b8222a4a69dfae33cfa 100644 (file)
@@ -24,14 +24,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this. */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 /* Function which parses command options; returns true if it
    ate an option */
 static int
@@ -96,7 +88,6 @@ static struct iptables_match helper = {
        .version        = IPTABLES_VERSION,
        .size           = IPT_ALIGN(sizeof(struct ipt_helper_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 32c04f6df771d8e4265797c73c5cea10b1920277..9d45c8c659f557cc5081d89aec880aeed4b045a5 100644 (file)
@@ -114,7 +114,7 @@ static struct option opts[] = {
        {0}
 };
 
-static unsigned int
+static void 
 parse_icmp(const char *icmptype, u_int8_t *type, u_int8_t code[])
 {
        unsigned int limit = sizeof(icmp_codes)/sizeof(struct icmp_names);
@@ -165,10 +165,6 @@ parse_icmp(const char *icmptype, u_int8_t *type, u_int8_t code[])
                        code[1] = 0xFF;
                }
        }
-
-       if (code[0] == 0 && code[1] == 0xFF)
-               return NFC_IP_SRC_PT;
-       else return NFC_IP_SRC_PT | NFC_IP_DST_PT;
 }
 
 /* Initialize the match. */
@@ -194,9 +190,8 @@ parse(int c, char **argv, int invert, unsigned int *flags,
        switch (c) {
        case '1':
                check_inverse(optarg, &invert, &optind, 0);
-               *nfcache |= parse_icmp(argv[optind-1],
-                                      &icmpinfo->type,
-                                      icmpinfo->code);
+               parse_icmp(argv[optind-1], &icmpinfo->type, 
+                          icmpinfo->code);
                if (invert)
                        icmpinfo->invflags |= IPT_ICMP_INV;
                break;
index 7d5c133418c13861e32e616fffbbeabde57d4327..2ada8e278a8c64d4f7e1e85e40f1ac41f8fc1dac 100644 (file)
@@ -26,14 +26,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this. */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static void
 parse_iprange(char *arg, struct ipt_iprange *range)
 {
@@ -180,7 +172,6 @@ static struct iptables_match iprange = {
        .size           = IPT_ALIGN(sizeof(struct ipt_iprange_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_iprange_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index dd3e80a81546b3cb837619cebf975ff9aa47fbdf..3d3b23608aaf9bc002b062c8457e9fdf377e7cd9 100644 (file)
@@ -35,14 +35,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* caching not yet implemented */
-        *nfcache |= NFC_UNKNOWN;
-}
-
 /* Function which parses command options; returns true if it
    ate an option */
 static int
@@ -306,7 +298,6 @@ static struct iptables_match ipv4options_struct = {
        .size           = IPT_ALIGN(sizeof(struct ipt_ipv4options_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_ipv4options_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index fcd14bcbc16698c2d58c399290868e8784b4690a..cfac1c5ff78a147d90f43782bc089d73017f9443 100644 (file)
@@ -25,13 +25,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static u_int16_t
 parse_length(const char *s)
 {
@@ -145,7 +138,6 @@ static struct iptables_match length = {
        .size           = IPT_ALIGN(sizeof(struct ipt_length_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_length_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index ad5e273307d92880349f5b98072e263f3dbd4d77..7f0337ae6e50e9d2e505d0a473ffd9a2de6ec2d2 100644 (file)
@@ -81,8 +81,6 @@ init(struct ipt_entry_match *m, unsigned int *nfcache)
        parse_rate(IPT_LIMIT_AVG, &r->avg);
        r->burst = IPT_LIMIT_BURST;
 
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* FIXME: handle overflow:
index 30da7fabc976f52b825fcceb01c0e241a16054aa..bac851257902e7e864a07d0d57a46322978c5e55 100644 (file)
@@ -28,14 +28,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static void
 parse_mac(const char *mac, struct ipt_mac_info *info)
 {
@@ -135,7 +127,6 @@ static struct iptables_match mac = {
        .size           = IPT_ALIGN(sizeof(struct ipt_mac_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_mac_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 1e031ca8994759507a2b1b30fab349f3b8646211..1922768e0e2cdd5ab1deca2d652174013d6ced7e 100644 (file)
@@ -25,14 +25,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this. */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 /* Function which parses command options; returns true if it
    ate an option */
 static int
@@ -138,7 +130,6 @@ static struct iptables_match mark = {
        .size           = IPT_ALIGN(sizeof(struct ipt_mark_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_mark_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 63acbd9bd00fd48ad9584491b782b90d1b4187a3..a387b2141439a3dcc019ed7b2e534b57402aed09 100644 (file)
@@ -140,7 +140,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                proto = check_proto(entry);
                parse_multi_ports(argv[optind-1], minfo, proto);
                minfo->flags = IPT_MPORT_SOURCE;
-               *nfcache |= NFC_IP_SRC_PT;
                break;
 
        case '2':
@@ -148,7 +147,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                proto = check_proto(entry);
                parse_multi_ports(argv[optind-1], minfo, proto);
                minfo->flags = IPT_MPORT_DESTINATION;
-               *nfcache |= NFC_IP_DST_PT;
                break;
 
        case '3':
@@ -156,7 +154,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                proto = check_proto(entry);
                parse_multi_ports(argv[optind-1], minfo, proto);
                minfo->flags = IPT_MPORT_EITHER;
-               *nfcache |= NFC_IP_SRC_PT | NFC_IP_DST_PT;
                break;
 
        default:
index 7fb6d72fd691fab5dff62104ede88b4ac18345b5..9f5193fa9b93d64176f16dee4f1b73e5d517a5d1 100644 (file)
@@ -179,7 +179,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                multiinfo->count = parse_multi_ports(argv[optind-1],
                                                     multiinfo->ports, proto);
                multiinfo->flags = IPT_MULTIPORT_SOURCE;
-               *nfcache |= NFC_IP_SRC_PT;
                break;
 
        case '2':
@@ -188,7 +187,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                multiinfo->count = parse_multi_ports(argv[optind-1],
                                                     multiinfo->ports, proto);
                multiinfo->flags = IPT_MULTIPORT_DESTINATION;
-               *nfcache |= NFC_IP_DST_PT;
                break;
 
        case '3':
@@ -197,7 +195,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                multiinfo->count = parse_multi_ports(argv[optind-1],
                                                     multiinfo->ports, proto);
                multiinfo->flags = IPT_MULTIPORT_EITHER;
-               *nfcache |= NFC_IP_SRC_PT | NFC_IP_DST_PT;
                break;
 
        default:
@@ -231,7 +228,6 @@ parse_v1(int c, char **argv, int invert, unsigned int *flags,
                proto = check_proto(entry);
                parse_multi_ports_v1(argv[optind-1], multiinfo, proto);
                multiinfo->flags = IPT_MULTIPORT_SOURCE;
-               *nfcache |= NFC_IP_SRC_PT;
                break;
 
        case '2':
@@ -239,7 +235,6 @@ parse_v1(int c, char **argv, int invert, unsigned int *flags,
                proto = check_proto(entry);
                parse_multi_ports_v1(argv[optind-1], multiinfo, proto);
                multiinfo->flags = IPT_MULTIPORT_DESTINATION;
-               *nfcache |= NFC_IP_DST_PT;
                break;
 
        case '3':
@@ -247,7 +242,6 @@ parse_v1(int c, char **argv, int invert, unsigned int *flags,
                proto = check_proto(entry);
                parse_multi_ports_v1(argv[optind-1], multiinfo, proto);
                multiinfo->flags = IPT_MULTIPORT_EITHER;
-               *nfcache |= NFC_IP_SRC_PT | NFC_IP_DST_PT;
                break;
 
        default:
index 569b1ade24d77938a2af86785599b91584e3e0e4..6f483b9f52c8b0e092c27290a4616a8162e2cffa 100644 (file)
@@ -50,13 +50,6 @@ static struct option opts[] = {
        { 0 }
 };
 
-/* Initialize the target. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_UNKNOWN;
-}
-
 #define IPT_NTH_OPT_EVERY      0x01
 #define IPT_NTH_OPT_NOT_EVERY  0x02
 #define IPT_NTH_OPT_START      0x04
@@ -224,7 +217,6 @@ static struct iptables_match nth = {
        .size           = IPT_ALIGN(sizeof(struct ipt_nth_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_nth_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 3c758c21b69cfa5a83fc6a6875474f42f6231a0f..e3610fce114fc90b0a7b83835baf43cdfc710a4a 100644 (file)
@@ -54,13 +54,6 @@ static struct option opts[] = {
        { .name = 0 }
 };
 
-
-static void init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_UNKNOWN;
-}
-
-
 static void parse_string(const unsigned char *s, struct ipt_osf_info *info)
 {
        if (strlen(s) < MAXGENRELEN) 
@@ -142,7 +135,6 @@ static struct iptables_match osf_match = {
     .size          = IPT_ALIGN(sizeof(struct ipt_osf_info)),
     .userspacesize = IPT_ALIGN(sizeof(struct ipt_osf_info)),
     .help          = &help,
-    .init          = &init,
     .parse         = &parse,
     .final_check   = &final_check,
     .print         = &print,
index 46da9e337460d080be5cf1094a41fcf8c994d98a..cf13cb970ba8c5ece54e7d1c30e25424c7fb7de0 100644 (file)
@@ -49,14 +49,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this. */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 /* Function which parses command options; returns true if it
    ate an option */
 static int
@@ -245,7 +237,6 @@ static struct iptables_match owner = {
        .size           = IPT_ALIGN(sizeof(struct ipt_owner_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_owner_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index af220955187d35d1fcae811007dc0a19bc38a581..ea6439efd2fade4cdcdbd86ca31a512f77086777 100644 (file)
@@ -69,11 +69,6 @@ static struct option opts[] = {
        {0}
 };
 
-static void init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static void parse_pkttype(const char *pkttype, struct ipt_pkttype_info *info)
 {
        unsigned int    i;
@@ -159,7 +154,6 @@ static struct iptables_match pkttype = {
        .size           = IPT_ALIGN(sizeof(struct ipt_pkttype_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_pkttype_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse, 
        .final_check    = &final_check, 
        .print          = &print,
index 7e204dad9619f925083b2ea3664510b4ae1d14c6..0d6492038641219bb80eb1ba77094a658c8bc437 100644 (file)
@@ -43,8 +43,6 @@ init(struct ipt_entry_match *match, unsigned int *nfcache)
        info->src = IP_POOL_NONE;
        info->dst = IP_POOL_NONE;
        info->flags = 0;
-       /* Can't cache this - XXX */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* Function which parses command options; returns true if it ate an option */
index e150e09e554e4404177da6644765e3e9c978a60d..3d0034ab46da636569b3d52fdadffb8186f9dbfb 100644 (file)
@@ -56,8 +56,6 @@ init(struct ipt_entry_match *m, unsigned int *nfcache)
        psdinfo->delay_threshold = SCAN_DELAY_THRESHOLD;
        psdinfo->lo_ports_weight = PORT_WEIGHT_PRIV;
        psdinfo->hi_ports_weight = PORT_WEIGHT_HIGH;
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 
index b0de7adb7387dd61053ea37eeb07f9f32ca57e4d..a9c138c5d8fdd7b16fd81a3a7f583ec2fe2e1e01 100644 (file)
@@ -24,14 +24,6 @@ help(void)
                " --quota quota                 quota (bytes)\n" "\n");
 }
 
-/* initialise match */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-        /* no can cache */
-        *nfcache |= NFC_UNKNOWN;
-}
-
 /* print matchinfo */
 static void
 print(const struct ipt_ip *ip, const struct ipt_entry_match *match, int numeric)
@@ -100,7 +92,6 @@ struct iptables_match quota = {
        .size           = IPT_ALIGN(sizeof (struct ipt_quota_info)),
        .userspacesize  = IPT_ALIGN(sizeof (struct ipt_quota_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index fd815bbcd5a314da460c8296fb30d65b8b618d3f..d28ab8ce97cc59761e1fd22b563a3b966492c07c 100644 (file)
@@ -51,7 +51,6 @@ static void
 init(struct ipt_entry_match *m, unsigned int *nfcache)
 {
        struct ipt_rand_info *randinfo = (struct ipt_rand_info *)(m)->data;
-       *nfcache |= NFC_UNKNOWN;
 
        /* We assign the average to be 50 which is our default value */
        /* 50 * 2.55 = 128 */
index ec9d3e3486666f649d8d07ce51b3d1cef16c1a0e..90e60897097bc3a30c84be0e8e7acee609e637ca 100644 (file)
@@ -28,14 +28,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 /* Function which parses command options; returns true if it
    ate an option */
 static int
@@ -122,7 +114,6 @@ static struct iptables_match realm = { NULL,
        .size           = IPT_ALIGN(sizeof(struct ipt_realm_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_realm_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index a3942720fd08c9395fcb7eebe7d2d097ef170b24..0b0ed2d18e8cf5e589fd45483e887f88b8575200 100644 (file)
@@ -72,7 +72,6 @@ init(struct ipt_entry_match *match, unsigned int *nfcache)
 {
        struct ipt_recent_info *info = (struct ipt_recent_info *)(match)->data;
 
-       *nfcache |= NFC_UNKNOWN;
 
        strncpy(info->name,"DEFAULT",IPT_RECENT_NAME_LEN);
        /* eventhough IPT_RECENT_NAME_LEN is currently defined as 200,
index 819c8ef68e2d5b9a996bf230fd5ca6f0a3dab5ca..571d286bfe23f377cf9f9de5cbaf77fdbcde6fc4 100644 (file)
@@ -16,14 +16,6 @@ static struct option opts[] = {
        {0}
 };
 
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this. */
-       *nfcache |= NFC_UNKNOWN;
-}
-
-
 /* Function which parses command options; returns true if it
    ate an option */
 static int
@@ -53,19 +45,18 @@ static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match)
 }
 
 static
-struct iptables_match record_rpc
-= { NULL,
-    "record_rpc",
-    IPTABLES_VERSION,
-    IPT_ALIGN(0),
-    IPT_ALIGN(0),
-    &help,
-    &init,
-    &parse,
-    &final_check,
-    &print,
-    &save,
-    opts
+struct iptables_match record_rpc = { 
+       .next           = NULL,
+       .name           = "record_rpc",
+       .version        = IPTABLES_VERSION,
+       .size           = IPT_ALIGN(0),
+       .userspacesize  = IPT_ALIGN(0),
+       .help           = &help,
+       .parse          = &parse,
+       .final_check    = &final_check,
+       .print          = &print,
+       .save           = &save,
+       .extra_opts     = opts
 };
 
 void _init(void)
index 0717795984043fb5c81b826f2753c2d32e116cb5..f6e897acdc66a75b506de312c434ece99c313246 100644 (file)
@@ -180,8 +180,6 @@ static void init(struct ipt_entry_match *match, unsigned int *nfcache)
        struct ipt_rpc_info *rpcinfo = ((struct ipt_rpc_info *)match->data);
 
 
-       /* caching not yet implemented */
-        *nfcache |= NFC_UNKNOWN;
 
        /* initialise those funky user vars */
        rpcinfo->i_procs = -1;
index f12403c55c3acd52b21ab6e02c9f6c4a2ae52393..af35f9ce9f3044711508551e69d5e6fa95f92827 100644 (file)
@@ -293,7 +293,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                if (invert)
                        einfo->invflags |= IPT_SCTP_SRC_PORTS;
                *flags |= IPT_SCTP_SRC_PORTS;
-               *nfcache |= NFC_IP_SRC_PT;
                break;
 
        case '2':
@@ -306,7 +305,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                if (invert)
                        einfo->invflags |= IPT_SCTP_DEST_PORTS;
                *flags |= IPT_SCTP_DEST_PORTS;
-               *nfcache |= NFC_IP_DST_PT;
                break;
 
        case '3':
index 7ab78ff790e9d259f7a9af2efff4d76eb8fa68c2..e485f054ca3720a9c981c12b99f1be7a1da5df96 100644 (file)
@@ -47,8 +47,6 @@ static void init(struct ipt_entry_match *match, unsigned int *nfcache)
 
        memset(info, 0, sizeof(struct ipt_set_info_match));
 
-       /* Can't cache this - XXX */
-       *nfcache |= NFC_UNKNOWN;
 }
 
 /* Function which parses command options; returns true if it ate an option */
index 8e6a90c566af5b29ec83da2e78efbe30fcd661f1..acafe9a79709c5a6718cf49695e27bfc8ae44216 100644 (file)
@@ -28,14 +28,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static int
 parse_state(const char *state, size_t strlen, struct ipt_state_info *sinfo)
 {
@@ -158,7 +150,6 @@ static struct iptables_match state = {
        .size           = IPT_ALIGN(sizeof(struct ipt_state_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_state_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 2ffdb74ebb9eb5cc8b9326e41ad21458803a4f8f..508eb90b1eae53836e9b92ba7d5a50a466f48ee6 100644 (file)
@@ -44,15 +44,6 @@ static struct option opts[] = {
        { .name = 0 }
 };
 
-
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_UNKNOWN;
-}
-
-
 static void
 parse_string(const unsigned char *s, struct ipt_string_info *info)
 {      
@@ -279,7 +270,6 @@ static struct iptables_match string = {
     .size          = IPT_ALIGN(sizeof(struct ipt_string_info)),
     .userspacesize = IPT_ALIGN(sizeof(struct ipt_string_info)),
     .help          = &help,
-    .init          = &init,
     .parse         = &parse,
     .final_check   = &final_check,
     .print         = &print,
index 57515006a13e8e41f6e9605a8a52d661f87962a7..6f9ea06aba54a0319adf48e127aeedbab235aee3 100644 (file)
@@ -187,7 +187,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                if (invert)
                        tcpinfo->invflags |= IPT_TCP_INV_SRCPT;
                *flags |= TCP_SRC_PORTS;
-               *nfcache |= NFC_IP_SRC_PT;
                break;
 
        case '2':
@@ -199,7 +198,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                if (invert)
                        tcpinfo->invflags |= IPT_TCP_INV_DSTPT;
                *flags |= TCP_DST_PORTS;
-               *nfcache |= NFC_IP_DST_PT;
                break;
 
        case '3':
@@ -209,7 +207,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                                   " allowed");
                parse_tcp_flags(tcpinfo, "SYN,RST,ACK", "SYN", invert);
                *flags |= TCP_FLAGS;
-               *nfcache |= NFC_IP_TCPFLAGS;
                break;
 
        case '4':
@@ -228,7 +225,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                                invert);
                optind++;
                *flags |= TCP_FLAGS;
-               *nfcache |= NFC_IP_TCPFLAGS;
                break;
 
        case '5':
@@ -240,7 +236,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                if (invert)
                        tcpinfo->invflags |= IPT_TCP_INV_OPTION;
                *flags |= TCP_OPTION;
-               *nfcache |= NFC_IP_PROTO_UNKNOWN;
                break;
 
        default:
index d596ea74e750cb63667f5a83695bbffe540125d9..9a399bbddbac254d469937bccbf21dfcb2391054 100644 (file)
@@ -24,13 +24,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_IP_PROTO_UNKNOWN;
-}
-
 static u_int16_t
 parse_tcp_mssvalue(const char *mssvalue)
 {
@@ -146,7 +139,6 @@ static struct iptables_match tcpmss = {
        .size           = IPT_ALIGN(sizeof(struct ipt_tcpmss_match_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_tcpmss_match_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index cceab58d11b3396ef5846292cf83d3e6bd989d92..dcf2dc679d7e4e82e5eb6c8353a056a7418732a5 100644 (file)
@@ -57,8 +57,6 @@ init(struct ipt_entry_match *m, unsigned int *nfcache)
 {
        struct ipt_time_info *info = (struct ipt_time_info *)m->data;
        globaldays = 0;
-       /* caching not yet implemented */
-        *nfcache |= NFC_UNKNOWN;
         /* By default, we match on everyday */
        info->days_match = 127;
        /* By default, we match on every hour:min of the day */
index 6241950ad7935470157720413a2ad7a9bc9d115d..7a10a5022f260e31fbfb331ada3f4fd1054c7981 100644 (file)
@@ -47,13 +47,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_IP_TOS;
-}
-
 static void
 parse_tos(const unsigned char *s, struct ipt_tos_info *info)
 {
@@ -166,7 +159,6 @@ static struct iptables_match tos = {
        .size           = IPT_ALIGN(sizeof(struct ipt_tos_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_tos_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index 8d47dbecf04e0efb6fab8faa25c709dca7e88ed2..3a25734b519ce20f447d96808e301b97368a5326 100644 (file)
@@ -24,12 +24,6 @@ static void help(void)
 , IPTABLES_VERSION);
 }
 
-static void init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* caching not yet implemented */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 static int parse(int c, char **argv, int invert, unsigned int *flags,
                const struct ipt_entry *entry, unsigned int *nfcache,
                struct ipt_entry_match **match)
@@ -156,7 +150,6 @@ static struct iptables_match ttl = {
        .size           = IPT_ALIGN(sizeof(struct ipt_ttl_info)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_ttl_info)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index c5f5b4d92abaa07f0cb93cd835a644867f7c1431..7504510038212aea96adb3ea54111660fc3ba971 100644 (file)
@@ -37,13 +37,6 @@ static struct option opts[] = {
        { 0 }
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       *nfcache |= NFC_UNKNOWN;
-}
-
 /* shared printing code */
 static void print_u32(struct ipt_u32 *data)
 {
@@ -257,7 +250,6 @@ struct iptables_match u32 = {
        .size           = IPT_ALIGN(sizeof(struct ipt_u32)),
        .userspacesize  = IPT_ALIGN(sizeof(struct ipt_u32)),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = &print,
index fb52cf018e1c41604a87fa6d867d66af753cdc14..f45f364ca06608ccbaf777193f81aa0b7937f1c6 100644 (file)
@@ -109,7 +109,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                if (invert)
                        udpinfo->invflags |= IPT_UDP_INV_SRCPT;
                *flags |= UDP_SRC_PORTS;
-               *nfcache |= NFC_IP_SRC_PT;
                break;
 
        case '2':
@@ -121,7 +120,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
                if (invert)
                        udpinfo->invflags |= IPT_UDP_INV_DSTPT;
                *flags |= UDP_DST_PORTS;
-               *nfcache |= NFC_IP_DST_PT;
                break;
 
        default:
index a97b0f0eaf53e4a0a6d19619d4338fbbb44ef0e4..7b9b3e4269e4b2c44376571fa657d54c077272d3 100644 (file)
@@ -17,14 +17,6 @@ static struct option opts[] = {
        {0}
 };
 
-/* Initialize the match. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
-       /* Can't cache this. */
-       *nfcache |= NFC_UNKNOWN;
-}
-
 /* Function which parses command options; returns true if it
    ate an option */
 static int
@@ -49,7 +41,6 @@ struct iptables_match unclean = {
        .size           = IPT_ALIGN(0),
        .userspacesize  = IPT_ALIGN(0),
        .help           = &help,
-       .init           = &init,
        .parse          = &parse,
        .final_check    = &final_check,
        .print          = NULL,
index aa1e148bdc2a050c545ceea3ed04e18c94229478..de48f774ae216ee1490d6e10e27c27946d829491 100644 (file)
@@ -1887,7 +1887,6 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
                            && (fw.ipv6.invflags & IP6T_INV_PROTO))
                                exit_error(PARAMETER_PROBLEM,
                                           "rule would never match protocol");
-                       fw.nfcache |= NFC_IP6_PROTO;
                        break;
 
                case 's':
@@ -1895,7 +1894,6 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
                        set_option(&options, OPT_SOURCE, &fw.ipv6.invflags,
                                   invert);
                        shostnetworkmask = argv[optind-1];
-                       fw.nfcache |= NFC_IP6_SRC;
                        break;
 
                case 'd':
@@ -1903,7 +1901,6 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
                        set_option(&options, OPT_DESTINATION, &fw.ipv6.invflags,
                                   invert);
                        dhostnetworkmask = argv[optind-1];
-                       fw.nfcache |= NFC_IP6_DST;
                        break;
 
                case 'j':
@@ -1935,7 +1932,6 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
                        parse_interface(argv[optind-1],
                                        fw.ipv6.iniface,
                                        fw.ipv6.iniface_mask);
-                       fw.nfcache |= NFC_IP6_IF_IN;
                        break;
 
                case 'o':
@@ -1945,7 +1941,6 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
                        parse_interface(argv[optind-1],
                                        fw.ipv6.outiface,
                                        fw.ipv6.outiface_mask);
-                       fw.nfcache |= NFC_IP6_IF_OUT;
                        break;
 
                case 'v':
index ace499922db8c6a9b6d0226490fff0174463ca50..06d04810076c3e0275f79b66560234db0f231497 100644 (file)
@@ -1987,7 +1987,6 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
                            && (fw.ip.invflags & IPT_INV_PROTO))
                                exit_error(PARAMETER_PROBLEM,
                                           "rule would never match protocol");
-                       fw.nfcache |= NFC_IP_PROTO;
                        break;
 
                case 's':
@@ -1995,7 +1994,6 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
                        set_option(&options, OPT_SOURCE, &fw.ip.invflags,
                                   invert);
                        shostnetworkmask = argv[optind-1];
-                       fw.nfcache |= NFC_IP_SRC;
                        break;
 
                case 'd':
@@ -2003,7 +2001,6 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
                        set_option(&options, OPT_DESTINATION, &fw.ip.invflags,
                                   invert);
                        dhostnetworkmask = argv[optind-1];
-                       fw.nfcache |= NFC_IP_DST;
                        break;
 
                case 'j':
@@ -2024,7 +2021,8 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
                                strcpy(target->t->u.user.name, jumpto);
                                set_revision(target->t->u.user.name,
                                             target->revision);
-                               target->init(target->t, &fw.nfcache);
+                               if (target->init != NULL)
+                                       target->init(target->t, &fw.nfcache);
                                opts = merge_options(opts, target->extra_opts, &target->option_offset);
                        }
                        break;
@@ -2037,7 +2035,6 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
                        parse_interface(argv[optind-1],
                                        fw.ip.iniface,
                                        fw.ip.iniface_mask);
-                       fw.nfcache |= NFC_IP_IF_IN;
                        break;
 
                case 'o':
@@ -2047,14 +2044,12 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
                        parse_interface(argv[optind-1],
                                        fw.ip.outiface,
                                        fw.ip.outiface_mask);
-                       fw.nfcache |= NFC_IP_IF_OUT;
                        break;
 
                case 'f':
                        set_option(&options, OPT_FRAGMENT, &fw.ip.invflags,
                                   invert);
                        fw.ip.flags |= IPT_F_FRAG;
-                       fw.nfcache |= NFC_IP_FRAG;
                        break;
 
                case 'v':
@@ -2078,7 +2073,8 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
                        m->m->u.match_size = size;
                        strcpy(m->m->u.user.name, m->name);
                        set_revision(m->m->u.user.name, m->revision);
-                       m->init(m->m, &fw.nfcache);
+                       if (m->init != NULL)
+                               m->init(m->m, &fw.nfcache);
                        opts = merge_options(opts, m->extra_opts, &m->option_offset);
                }
                break;
@@ -2221,7 +2217,8 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
                                        strcpy(m->m->u.user.name, m->name);
                                        set_revision(m->m->u.user.name,
                                                     m->revision);
-                                       m->init(m->m, &fw.nfcache);
+                                       if (m->init != NULL)
+                                               m->init(m->m, &fw.nfcache);
 
                                        opts = merge_options(opts,
                                            m->extra_opts, &m->option_offset);
@@ -2349,7 +2346,8 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
                        target->t->u.target_size = size;
                        strcpy(target->t->u.user.name, jumpto);
                        set_revision(target->t->u.user.name, target->revision);
-                       target->init(target->t, &fw.nfcache);
+                       if (target->init != NULL)
+                               target->init(target->t, &fw.nfcache);
                }
 
                if (!target) {
index f623c78c4a1a6ebfbfc90b0fdc6aa1c6210b9dcd..392a9de10d640924d5557760716074e2e39cfbd3 100644 (file)
@@ -149,17 +149,6 @@ dump_entry(STRUCT_ENTRY *e, const TC_HANDLE_T handle)
        printf("Cache: %08X ", e->nfcache);
        if (e->nfcache & NFC_ALTERED) printf("ALTERED ");
        if (e->nfcache & NFC_UNKNOWN) printf("UNKNOWN ");
-       if (e->nfcache & NFC_IP_SRC) printf("IP_SRC ");
-       if (e->nfcache & NFC_IP_DST) printf("IP_DST ");
-       if (e->nfcache & NFC_IP_IF_IN) printf("IP_IF_IN ");
-       if (e->nfcache & NFC_IP_IF_OUT) printf("IP_IF_OUT ");
-       if (e->nfcache & NFC_IP_TOS) printf("IP_TOS ");
-       if (e->nfcache & NFC_IP_PROTO) printf("IP_PROTO ");
-       if (e->nfcache & NFC_IP_OPTIONS) printf("IP_OPTIONS ");
-       if (e->nfcache & NFC_IP_TCPFLAGS) printf("IP_TCPFLAGS ");
-       if (e->nfcache & NFC_IP_SRC_PT) printf("IP_SRC_PT ");
-       if (e->nfcache & NFC_IP_DST_PT) printf("IP_DST_PT ");
-       if (e->nfcache & NFC_IP_PROTO_UNKNOWN) printf("IP_PROTO_UNKNOWN ");
        printf("\n");
 
        IPT_MATCH_ITERATE(e, print_match);
index 06b15fbc9cdf2f4effd439c603fab40d7ef31853..1c1f14e5eaea5c0b0412c60db8435fae4a1b8196 100644 (file)
@@ -180,17 +180,6 @@ dump_entry(struct ip6t_entry *e, const ip6tc_handle_t handle)
        printf("Cache: %08X ", e->nfcache);
        if (e->nfcache & NFC_ALTERED) printf("ALTERED ");
        if (e->nfcache & NFC_UNKNOWN) printf("UNKNOWN ");
-       if (e->nfcache & NFC_IP6_SRC) printf("IP6_SRC ");
-       if (e->nfcache & NFC_IP6_DST) printf("IP6_DST ");
-       if (e->nfcache & NFC_IP6_IF_IN) printf("IP6_IF_IN ");
-       if (e->nfcache & NFC_IP6_IF_OUT) printf("IP6_IF_OUT ");
-       if (e->nfcache & NFC_IP6_TOS) printf("IP6_TOS ");
-       if (e->nfcache & NFC_IP6_PROTO) printf("IP6_PROTO ");
-       if (e->nfcache & NFC_IP6_OPTIONS) printf("IP6_OPTIONS ");
-       if (e->nfcache & NFC_IP6_TCPFLAGS) printf("IP6_TCPFLAGS ");
-       if (e->nfcache & NFC_IP6_SRC_PT) printf("IP6_SRC_PT ");
-       if (e->nfcache & NFC_IP6_DST_PT) printf("IP6_DST_PT ");
-       if (e->nfcache & NFC_IP6_PROTO_UNKNOWN) printf("IP6_PROTO_UNKNOWN ");
        printf("\n");
        
        IP6T_MATCH_ITERATE(e, print_match);