]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
netfilter: xtables: deconstify struct xt_action_param for matches
authorJan Engelhardt <jengelh@medozas.de>
Tue, 7 Jul 2009 18:42:08 +0000 (20:42 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Tue, 11 May 2010 16:33:37 +0000 (18:33 +0200)
In future, layer-3 matches will be an xt module of their own, and
need to set the fragoff and thoff fields. Adding more pointers would
needlessy increase memory requirements (esp. so for 64-bit, where
pointers are wider).

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
59 files changed:
include/linux/netfilter/x_tables.h
net/bridge/netfilter/ebt_802_3.c
net/bridge/netfilter/ebt_among.c
net/bridge/netfilter/ebt_arp.c
net/bridge/netfilter/ebt_ip.c
net/bridge/netfilter/ebt_ip6.c
net/bridge/netfilter/ebt_limit.c
net/bridge/netfilter/ebt_mark_m.c
net/bridge/netfilter/ebt_pkttype.c
net/bridge/netfilter/ebt_stp.c
net/bridge/netfilter/ebt_vlan.c
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/ipt_addrtype.c
net/ipv4/netfilter/ipt_ah.c
net/ipv4/netfilter/ipt_ecn.c
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6t_ah.c
net/ipv6/netfilter/ip6t_eui64.c
net/ipv6/netfilter/ip6t_frag.c
net/ipv6/netfilter/ip6t_hbh.c
net/ipv6/netfilter/ip6t_ipv6header.c
net/ipv6/netfilter/ip6t_mh.c
net/ipv6/netfilter/ip6t_rt.c
net/netfilter/xt_cluster.c
net/netfilter/xt_comment.c
net/netfilter/xt_connbytes.c
net/netfilter/xt_connlimit.c
net/netfilter/xt_connmark.c
net/netfilter/xt_conntrack.c
net/netfilter/xt_dccp.c
net/netfilter/xt_dscp.c
net/netfilter/xt_esp.c
net/netfilter/xt_hashlimit.c
net/netfilter/xt_helper.c
net/netfilter/xt_hl.c
net/netfilter/xt_iprange.c
net/netfilter/xt_length.c
net/netfilter/xt_limit.c
net/netfilter/xt_mac.c
net/netfilter/xt_mark.c
net/netfilter/xt_multiport.c
net/netfilter/xt_osf.c
net/netfilter/xt_owner.c
net/netfilter/xt_physdev.c
net/netfilter/xt_pkttype.c
net/netfilter/xt_policy.c
net/netfilter/xt_quota.c
net/netfilter/xt_rateest.c
net/netfilter/xt_realm.c
net/netfilter/xt_recent.c
net/netfilter/xt_sctp.c
net/netfilter/xt_socket.c
net/netfilter/xt_state.c
net/netfilter/xt_statistic.c
net/netfilter/xt_string.c
net/netfilter/xt_tcpmss.c
net/netfilter/xt_tcpudp.c
net/netfilter/xt_time.c
net/netfilter/xt_u32.c

index 6d1f9a63805663974223dbe5d4fdbbbfc83c0e13..40c6a8d2a9eaef319fcc513d6011c2f2bcba6c35 100644 (file)
@@ -288,7 +288,7 @@ struct xt_match {
           non-linear skb, using skb_header_pointer and
           skb_ip_make_writable. */
        bool (*match)(const struct sk_buff *skb,
-                     const struct xt_action_param *);
+                     struct xt_action_param *);
 
        /* Called when user tries to insert an entry of this type. */
        int (*checkentry)(const struct xt_mtchk_param *);
index 4b0df00c82ecc60ad45f7dc975543f5d5b0d498c..2a449b7ab8fac3c53cc777aa86a963092824029b 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/netfilter_bridge/ebt_802_3.h>
 
 static bool
-ebt_802_3_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+ebt_802_3_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ebt_802_3_info *info = par->matchinfo;
        const struct ebt_802_3_hdr *hdr = ebt_802_3_hdr(skb);
index c04f9461f734b131b68a58d181b32a9ce25cd4c3..8b84c581be3082ea4c8a6a21a362a3077ab17751 100644 (file)
@@ -129,7 +129,7 @@ static int get_ip_src(const struct sk_buff *skb, __be32 *addr)
 }
 
 static bool
-ebt_among_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+ebt_among_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ebt_among_info *info = par->matchinfo;
        const char *dmac, *smac;
index 6203f4dea2e212d0ff45f61e95d78a2083877572..cd457b891b27ec5836653f75b02ac5e8a3d44ef5 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/netfilter_bridge/ebt_arp.h>
 
 static bool
-ebt_arp_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+ebt_arp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ebt_arp_info *info = par->matchinfo;
        const struct arphdr *ah;
index a0cde7442b55b50e4200ba73ae7a3e67bf5aa348..23bca62d58d290f5085094b3b5d8c74b21a7c8fc 100644 (file)
@@ -25,7 +25,7 @@ struct tcpudphdr {
 };
 
 static bool
-ebt_ip_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+ebt_ip_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ebt_ip_info *info = par->matchinfo;
        const struct iphdr *ih;
index c451dc2ff8222d8ab948660f04d9ce96779daf8f..50a46afc2bcc28c2714c8b0f9cdde95432c569fd 100644 (file)
@@ -28,7 +28,7 @@ struct tcpudphdr {
 };
 
 static bool
-ebt_ip6_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+ebt_ip6_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ebt_ip6_info *info = par->matchinfo;
        const struct ipv6hdr *ih6;
index 760923f08067bd81f554e2d7b015e8f5ca44f681..517e78befcb2688a76e307ba7e7064e334700cb1 100644 (file)
@@ -32,7 +32,7 @@ static DEFINE_SPINLOCK(limit_lock);
 #define CREDITS_PER_JIFFY POW2_BELOW32(MAX_CPJ)
 
 static bool
-ebt_limit_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+ebt_limit_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct ebt_limit_info *info = (void *)par->matchinfo;
        unsigned long now = jiffies;
index de901634fa3108b1b7c6bb49d3fcdf700002f08c..d98baefc4c7eef6a5f39039948064a4a95d64120 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/netfilter_bridge/ebt_mark_m.h>
 
 static bool
-ebt_mark_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+ebt_mark_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ebt_mark_m_info *info = par->matchinfo;
 
index 7ba67c4b677a59baff247028ba008e0699b7893d..496a565153074e47286f928975898ad66326bcef 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/netfilter_bridge/ebt_pkttype.h>
 
 static bool
-ebt_pkttype_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+ebt_pkttype_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ebt_pkttype_info *info = par->matchinfo;
 
index 3cd6070a1137c1bfff111c6cfd550fd82f527395..5b33a2e634a67ad231263ccb3c963e598b5bef6e 100644 (file)
@@ -120,7 +120,7 @@ static bool ebt_filter_config(const struct ebt_stp_info *info,
 }
 
 static bool
-ebt_stp_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+ebt_stp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ebt_stp_info *info = par->matchinfo;
        const struct stp_header *sp;
index e4ab62533c74df01030236290bb4543eac1dd7f3..87b53b3a921daefd40c0fd85ade33d5240f4262a 100644 (file)
@@ -36,7 +36,7 @@ MODULE_LICENSE("GPL");
 #define EXIT_ON_MISMATCH(_MATCH_,_MASK_) {if (!((info->_MATCH_ == _MATCH_)^!!(info->invflags & _MASK_))) return false; }
 
 static bool
-ebt_vlan_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+ebt_vlan_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ebt_vlan_info *info = par->matchinfo;
        const struct vlan_hdr *fp;
index 3ab1b81e799baf0ab2edaae27b2d27f9a1235950..4e674f2824a76d223cceb50e6c48f1329cc411bb 100644 (file)
@@ -2138,7 +2138,7 @@ icmp_type_code_match(u_int8_t test_type, u_int8_t min_code, u_int8_t max_code,
 }
 
 static bool
-icmp_match(const struct sk_buff *skb, const struct xt_action_param *par)
+icmp_match(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct icmphdr *ic;
        struct icmphdr _icmph;
index 24ec548515e4dfe98be636bd7de82590c4738553..db8bff0fb86dc711f1d422ba188a41f85a33d32f 100644 (file)
@@ -30,7 +30,7 @@ static inline bool match_type(struct net *net, const struct net_device *dev,
 }
 
 static bool
-addrtype_mt_v0(const struct sk_buff *skb, const struct xt_action_param *par)
+addrtype_mt_v0(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct net *net = dev_net(par->in ? par->in : par->out);
        const struct ipt_addrtype_info *info = par->matchinfo;
@@ -48,7 +48,7 @@ addrtype_mt_v0(const struct sk_buff *skb, const struct xt_action_param *par)
 }
 
 static bool
-addrtype_mt_v1(const struct sk_buff *skb, const struct xt_action_param *par)
+addrtype_mt_v1(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct net *net = dev_net(par->in ? par->in : par->out);
        const struct ipt_addrtype_info_v1 *info = par->matchinfo;
index 48a8293bc1d167e741a4fd03fd1160bd46a36f93..c9d83dc2d6fa5650ee68295c46080bdbe05a0d1e 100644 (file)
@@ -30,7 +30,7 @@ spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, bool invert)
        return r;
 }
 
-static bool ah_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+static bool ah_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct ip_auth_hdr _ahdr;
        const struct ip_auth_hdr *ah;
index 744d13ee296e3122059d0d481ba9610fdce4df3a..b79dddc9edd6236ed900bb02ad546d223e51805c 100644 (file)
@@ -67,8 +67,7 @@ static inline bool match_tcp(const struct sk_buff *skb,
        return true;
 }
 
-static bool ecn_mt(const struct sk_buff *skb,
-                  const struct xt_action_param *par)
+static bool ecn_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ipt_ecn_info *info = par->matchinfo;
 
index c3bc999a8bb6342858ae7b408de079ce1979010c..4549f8d6f88fdfcf3d7079ad8f58efb873e1cfa8 100644 (file)
@@ -2154,7 +2154,7 @@ icmp6_type_code_match(u_int8_t test_type, u_int8_t min_code, u_int8_t max_code,
 }
 
 static bool
-icmp6_match(const struct sk_buff *skb, const struct xt_action_param *par)
+icmp6_match(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct icmp6hdr *ic;
        struct icmp6hdr _icmph;
index 4fe71898381dac375d9d850d3caf2ed4b123b8f7..c89887f35a46f522689a6bfe10e3f7269c7db00e 100644 (file)
@@ -36,8 +36,7 @@ spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, bool invert)
        return r;
 }
 
-static bool ah_mt6(const struct sk_buff *skb,
-                  const struct xt_action_param *par)
+static bool ah_mt6(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct ip_auth_hdr _ah;
        const struct ip_auth_hdr *ah;
index 2fd2be1795e087aa835723be964a318a9b73a57b..f32fce34145a6413ec98da1f709d6f79027b628c 100644 (file)
@@ -20,7 +20,7 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");
 
 static bool
-eui64_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
+eui64_mt6(const struct sk_buff *skb, struct xt_action_param *par)
 {
        unsigned char eui64[8];
 
index 8401aa82ea0b7b1c327e94d76c76f521f854042e..fcc8c72f218eaaa47694b46f766749f58bc00d9a 100644 (file)
@@ -35,7 +35,7 @@ id_match(u_int32_t min, u_int32_t max, u_int32_t id, bool invert)
 }
 
 static bool
-frag_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
+frag_mt6(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct frag_hdr _frag;
        const struct frag_hdr *fh;
index d19d5cf47a3866f9f4bb460ebce9ae5b6fad6221..f8aebc098d71ae4cab50b02375ea306adc766a6e 100644 (file)
@@ -44,7 +44,7 @@ MODULE_ALIAS("ip6t_dst");
 static struct xt_match hbh_mt6_reg[] __read_mostly;
 
 static bool
-hbh_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
+hbh_mt6(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct ipv6_opt_hdr _optsh;
        const struct ipv6_opt_hdr *oh;
index 8e88bb8311de36a8d2877978d719803b882aebbf..54bd9790603f253a417971eea50a4157fd0c75ae 100644 (file)
@@ -27,7 +27,7 @@ MODULE_DESCRIPTION("Xtables: IPv6 header types match");
 MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");
 
 static bool
-ipv6header_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
+ipv6header_mt6(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ip6t_ipv6header_info *info = par->matchinfo;
        unsigned int temp;
index 4a60788873fdf6e71cc8d8edf4bac4aba5ca9c24..eb1c3d65271ae93ebbbbcbc55250a998833fd374 100644 (file)
@@ -32,8 +32,7 @@ type_match(u_int8_t min, u_int8_t max, u_int8_t type, bool invert)
        return (type >= min && type <= max) ^ invert;
 }
 
-static bool mh_mt6(const struct sk_buff *skb,
-                  const struct xt_action_param *par)
+static bool mh_mt6(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct ip6_mh _mh;
        const struct ip6_mh *mh;
index 793c27200881fbc25b081f641e16883e977fc350..ee584693ee35343c5be31d3030ebb2011be05b13 100644 (file)
@@ -36,8 +36,7 @@ segsleft_match(u_int32_t min, u_int32_t max, u_int32_t id, bool invert)
        return r;
 }
 
-static bool rt_mt6(const struct sk_buff *skb,
-                  const struct xt_action_param *par)
+static bool rt_mt6(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct ipv6_rt_hdr _route;
        const struct ipv6_rt_hdr *rh;
index 67fc317118c0ff2f7ac3b7fe6231df6e6dd94cba..30b95a1c1c892da3018bbf9084e4fe3a8d59b4b1 100644 (file)
@@ -86,7 +86,7 @@ xt_cluster_is_multicast_addr(const struct sk_buff *skb, u_int8_t family)
 }
 
 static bool
-xt_cluster_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+xt_cluster_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct sk_buff *pskb = (struct sk_buff *)skb;
        const struct xt_cluster_match_info *info = par->matchinfo;
index 1dbb3e13c059ba4e2cfd70a8f8d8e0dd171679aa..5c861d2f21ca6feb528355e209ab679fd749a638 100644 (file)
@@ -16,7 +16,7 @@ MODULE_ALIAS("ipt_comment");
 MODULE_ALIAS("ip6t_comment");
 
 static bool
-comment_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+comment_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        /* We always match */
        return true;
index 5e5cf15f011f3ead22457995a84e06925399e9ea..73517835303d4fa68b2b34247d3907e2a7f4c3ca 100644 (file)
@@ -18,7 +18,7 @@ MODULE_ALIAS("ipt_connbytes");
 MODULE_ALIAS("ip6t_connbytes");
 
 static bool
-connbytes_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+connbytes_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_connbytes_info *sinfo = par->matchinfo;
        const struct nf_conn *ct;
index 6eec1913298ead54bce10cf562fee8536263733a..f130fd9817bee0373daa9034d595e732ff97adbb 100644 (file)
@@ -173,7 +173,7 @@ static int count_them(struct net *net,
 }
 
 static bool
-connlimit_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+connlimit_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct net *net = dev_net(par->in ? par->in : par->out);
        const struct xt_connlimit_info *info = par->matchinfo;
index b43cfc7f1bb557a656e24b8c20697acdce2a6c14..7278145e6a68385c71b1d64efccc3aee71cb2412 100644 (file)
@@ -91,7 +91,7 @@ static void connmark_tg_destroy(const struct xt_tgdtor_param *par)
 }
 
 static bool
-connmark_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+connmark_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_connmark_mtinfo1 *info = par->matchinfo;
        enum ip_conntrack_info ctinfo;
index 14a96f48001d19369d8567324ceac1f0b03cc4c9..39681f10291c13a8a72efbfebad857ca10a7d750 100644 (file)
@@ -113,7 +113,7 @@ ct_proto_port_check(const struct xt_conntrack_mtinfo2 *info,
 }
 
 static bool
-conntrack_mt(const struct sk_buff *skb, const struct xt_action_param *par,
+conntrack_mt(const struct sk_buff *skb, struct xt_action_param *par,
              u16 state_mask, u16 status_mask)
 {
        const struct xt_conntrack_mtinfo2 *info = par->matchinfo;
@@ -191,7 +191,7 @@ conntrack_mt(const struct sk_buff *skb, const struct xt_action_param *par,
 }
 
 static bool
-conntrack_mt_v1(const struct sk_buff *skb, const struct xt_action_param *par)
+conntrack_mt_v1(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_conntrack_mtinfo1 *info = par->matchinfo;
 
@@ -199,7 +199,7 @@ conntrack_mt_v1(const struct sk_buff *skb, const struct xt_action_param *par)
 }
 
 static bool
-conntrack_mt_v2(const struct sk_buff *skb, const struct xt_action_param *par)
+conntrack_mt_v2(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_conntrack_mtinfo2 *info = par->matchinfo;
 
index 7a4d4e8edc10b867624ee5b8691a19b09a2dd268..cc2c2919439f0781e2a03ef9c19bb2f55ffdb8a1 100644 (file)
@@ -96,7 +96,7 @@ match_option(u_int8_t option, const struct sk_buff *skb, unsigned int protoff,
 }
 
 static bool
-dccp_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+dccp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_dccp_info *info = par->matchinfo;
        const struct dccp_hdr *dh;
index 2133b509d157f1397d82d49553af366ac3b89242..64670fc5d0e1a581f4e3b3885d8117c7a70b0edb 100644 (file)
@@ -25,7 +25,7 @@ MODULE_ALIAS("ipt_tos");
 MODULE_ALIAS("ip6t_tos");
 
 static bool
-dscp_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+dscp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_dscp_info *info = par->matchinfo;
        u_int8_t dscp = ipv4_get_dsfield(ip_hdr(skb)) >> XT_DSCP_SHIFT;
@@ -34,7 +34,7 @@ dscp_mt(const struct sk_buff *skb, const struct xt_action_param *par)
 }
 
 static bool
-dscp_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
+dscp_mt6(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_dscp_info *info = par->matchinfo;
        u_int8_t dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> XT_DSCP_SHIFT;
@@ -54,8 +54,7 @@ static int dscp_mt_check(const struct xt_mtchk_param *par)
        return 0;
 }
 
-static bool tos_mt(const struct sk_buff *skb,
-                  const struct xt_action_param *par)
+static bool tos_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_tos_match_info *info = par->matchinfo;
 
index 39caafff948543e9d6c741d393c41b0d859eb9df..7c2d80020554426c8b10da7a964727c861f975c0 100644 (file)
@@ -36,8 +36,7 @@ spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, bool invert)
        return r;
 }
 
-static bool esp_mt(const struct sk_buff *skb,
-                  const struct xt_action_param *par)
+static bool esp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ip_esp_hdr *eh;
        struct ip_esp_hdr _esp;
index 700c21e0804c3beee92bf59269b0b557d2be6818..25a6e548ec2796fc9ebec2283d30cf1d09d83d27 100644 (file)
@@ -516,7 +516,7 @@ hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo,
 }
 
 static bool
-hashlimit_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+hashlimit_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_hashlimit_mtinfo1 *info = par->matchinfo;
        struct xt_hashlimit_htable *hinfo = info->hinfo;
index e941bd26a51957d6b63b3f76161eb34cc4778185..9f4ab00c80500635e8015b2384d25dea98641c56 100644 (file)
@@ -24,7 +24,7 @@ MODULE_ALIAS("ip6t_helper");
 
 
 static bool
-helper_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+helper_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_helper_info *info = par->matchinfo;
        const struct nf_conn *ct;
index 335c34a4fd1c1a674070003db64a4849ff70094f..7d12221ead8966136fc84b5a8ddce158a212258b 100644 (file)
@@ -25,8 +25,7 @@ MODULE_LICENSE("GPL");
 MODULE_ALIAS("ipt_ttl");
 MODULE_ALIAS("ip6t_hl");
 
-static bool ttl_mt(const struct sk_buff *skb,
-                  const struct xt_action_param *par)
+static bool ttl_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ipt_ttl_info *info = par->matchinfo;
        const u8 ttl = ip_hdr(skb)->ttl;
@@ -45,8 +44,7 @@ static bool ttl_mt(const struct sk_buff *skb,
        return false;
 }
 
-static bool hl_mt6(const struct sk_buff *skb,
-                  const struct xt_action_param *par)
+static bool hl_mt6(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ip6t_hl_info *info = par->matchinfo;
        const struct ipv6hdr *ip6h = ipv6_hdr(skb);
index 9578860a9217147067c0abfe1701f475e6aa480b..88f7c3511c72c2554de292e97c844cc934367c9e 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/netfilter/xt_iprange.h>
 
 static bool
-iprange_mt4(const struct sk_buff *skb, const struct xt_action_param *par)
+iprange_mt4(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_iprange_mtinfo *info = par->matchinfo;
        const struct iphdr *iph = ip_hdr(skb);
@@ -68,7 +68,7 @@ iprange_ipv6_sub(const struct in6_addr *a, const struct in6_addr *b)
 }
 
 static bool
-iprange_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
+iprange_mt6(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_iprange_mtinfo *info = par->matchinfo;
        const struct ipv6hdr *iph = ipv6_hdr(skb);
index 842149b4122c591c015b510f865091c382d7a444..176e5570a9991727c8613de3bd8fe3341a852501 100644 (file)
@@ -21,7 +21,7 @@ MODULE_ALIAS("ipt_length");
 MODULE_ALIAS("ip6t_length");
 
 static bool
-length_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+length_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_length_info *info = par->matchinfo;
        u_int16_t pktlen = ntohs(ip_hdr(skb)->tot_len);
@@ -30,7 +30,7 @@ length_mt(const struct sk_buff *skb, const struct xt_action_param *par)
 }
 
 static bool
-length_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
+length_mt6(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_length_info *info = par->matchinfo;
        const u_int16_t pktlen = ntohs(ipv6_hdr(skb)->payload_len) +
index 7dcfe8602c839457efd82b93e2e351b276cb03ec..32b7a579a032cde09c831f47c5ee8eae83adbd41 100644 (file)
@@ -65,7 +65,7 @@ static DEFINE_SPINLOCK(limit_lock);
 #define CREDITS_PER_JIFFY POW2_BELOW32(MAX_CPJ)
 
 static bool
-limit_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+limit_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_rateinfo *r = par->matchinfo;
        struct xt_limit_priv *priv = r->master;
index 36c49644ce3572f87a52985f86af001ec9a698b5..8160f6b1435d699371af378f3a5c90c2530161b5 100644 (file)
@@ -25,8 +25,7 @@ MODULE_DESCRIPTION("Xtables: MAC address match");
 MODULE_ALIAS("ipt_mac");
 MODULE_ALIAS("ip6t_mac");
 
-static bool mac_mt(const struct sk_buff *skb,
-                  const struct xt_action_param *par)
+static bool mac_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_mac_info *info = par->matchinfo;
        bool ret;
index 3c8347076d55084de2dcd5fb7ec8f934c59c6eb6..23345238711b515805a63687b774cdb4b6d788f4 100644 (file)
@@ -34,7 +34,7 @@ mark_tg(struct sk_buff *skb, const struct xt_action_param *par)
 }
 
 static bool
-mark_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+mark_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_mark_mtinfo1 *info = par->matchinfo;
 
index 3140fd4049fc7bc8df35912ba62c58c12d403db3..52beb68256c8961b265b32cdb2091604723a125d 100644 (file)
@@ -72,7 +72,7 @@ ports_match_v1(const struct xt_multiport_v1 *minfo,
 }
 
 static bool
-multiport_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+multiport_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const __be16 *pptr;
        __be16 _ports[2];
index 37aa55860a96a79c160f88a6192127a223c3c926..4327e101c047ff1f9c1469a1cfa1dc544dbda5b8 100644 (file)
@@ -194,7 +194,7 @@ static inline int xt_osf_ttl(const struct sk_buff *skb, const struct xt_osf_info
 }
 
 static bool
-xt_osf_match_packet(const struct sk_buff *skb, const struct xt_action_param *p)
+xt_osf_match_packet(const struct sk_buff *skb, struct xt_action_param *p)
 {
        const struct xt_osf_info *info = p->matchinfo;
        const struct iphdr *ip = ip_hdr(skb);
index 3dd1391d385afe185b5a78fcbf11d66bb869087e..772d7389b3376d623c9ab3a6ce71883619e356e1 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/netfilter/xt_owner.h>
 
 static bool
-owner_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+owner_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_owner_match_info *info = par->matchinfo;
        const struct file *filp;
index 298cd290b06ab281decf31e81872a8625df47543..d7ca16b8b8dfbcd8dec7c7ab67f9d6e5c3f957d9 100644 (file)
@@ -22,7 +22,7 @@ MODULE_ALIAS("ip6t_physdev");
 
 
 static bool
-physdev_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+physdev_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
        const struct xt_physdev_info *info = par->matchinfo;
index d95f2149df9380a6e4008bea9496a20b031fd71c..5b645cb598fc261d52d8b44c6acc63ac8d388dea 100644 (file)
@@ -23,7 +23,7 @@ MODULE_ALIAS("ipt_pkttype");
 MODULE_ALIAS("ip6t_pkttype");
 
 static bool
-pkttype_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+pkttype_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_pkttype_info *info = par->matchinfo;
        u_int8_t type;
index 1abfc7ad4277aed0260ee24450a5b487a43babea..f23e97bb42d7c0f860cdf15258e530a11bb54bef 100644 (file)
@@ -110,7 +110,7 @@ match_policy_out(const struct sk_buff *skb, const struct xt_policy_info *info,
 }
 
 static bool
-policy_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+policy_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_policy_info *info = par->matchinfo;
        int ret;
index e79e07c75da829278056af81300485cf14cc9d5f..b4f7dfea59805f3c705859163bfcf57fcb6b4da8 100644 (file)
@@ -23,7 +23,7 @@ MODULE_ALIAS("ip6t_quota");
 static DEFINE_SPINLOCK(quota_lock);
 
 static bool
-quota_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+quota_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct xt_quota_info *q = (void *)par->matchinfo;
        struct xt_quota_priv *priv = q->master;
index 53f7a4d12e1e85f25e9c1977606c516de8b5b367..76a083184d8e6991b0e49e4fb77db3e78d47488b 100644 (file)
@@ -15,7 +15,7 @@
 
 
 static bool
-xt_rateest_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+xt_rateest_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_rateest_match_info *info = par->matchinfo;
        struct gnet_stats_rate_est *r;
index b063c783901ab3c7b5a85ad7fb68362a14541bea..459a7b256eb2592c31d6150be137e08ed3f18079 100644 (file)
@@ -22,7 +22,7 @@ MODULE_DESCRIPTION("Xtables: Routing realm match");
 MODULE_ALIAS("ipt_realm");
 
 static bool
-realm_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+realm_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_realm_info *info = par->matchinfo;
        const struct dst_entry *dst = skb_dst(skb);
index 503b7f199f1404f5cd1ea34b7739b0643264915c..2808a7e33947f8ecc27e238f977f0e869c256a72 100644 (file)
@@ -224,7 +224,7 @@ static void recent_table_flush(struct recent_table *t)
 }
 
 static bool
-recent_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+recent_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        struct net *net = dev_net(par->in ? par->in : par->out);
        struct recent_net *recent_net = recent_pernet(net);
index da4c3cb31403d1ef2bb0808ffe2ed648e7cc0a48..94d8b5deb2d004c2f97d6e925e49c54268a8afa2 100644 (file)
@@ -114,7 +114,7 @@ match_packet(const struct sk_buff *skb,
 }
 
 static bool
-sctp_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+sctp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_sctp_info *info = par->matchinfo;
        const sctp_sctphdr_t *sh;
index 2665e32d5db14f2389a89ea096166638d0393902..3d54c236a1ba0643ba0077eee8caf4f93078155f 100644 (file)
@@ -88,7 +88,7 @@ extract_icmp_fields(const struct sk_buff *skb,
 
 
 static bool
-socket_match(const struct sk_buff *skb, const struct xt_action_param *par,
+socket_match(const struct sk_buff *skb, struct xt_action_param *par,
             const struct xt_socket_mtinfo1 *info)
 {
        const struct iphdr *iph = ip_hdr(skb);
@@ -174,13 +174,13 @@ socket_match(const struct sk_buff *skb, const struct xt_action_param *par,
 }
 
 static bool
-socket_mt_v0(const struct sk_buff *skb, const struct xt_action_param *par)
+socket_mt_v0(const struct sk_buff *skb, struct xt_action_param *par)
 {
        return socket_match(skb, par, NULL);
 }
 
 static bool
-socket_mt_v1(const struct sk_buff *skb, const struct xt_action_param *par)
+socket_mt_v1(const struct sk_buff *skb, struct xt_action_param *par)
 {
        return socket_match(skb, par, par->matchinfo);
 }
index 344cca6610996adeb905df2da7a6e7c9ee176b5f..e12e053d3782ba8f9252a5b5b8a2d3085b2345c3 100644 (file)
@@ -21,7 +21,7 @@ MODULE_ALIAS("ipt_state");
 MODULE_ALIAS("ip6t_state");
 
 static bool
-state_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+state_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_state_info *sinfo = par->matchinfo;
        enum ip_conntrack_info ctinfo;
index ee4540a2cf33761f987bfe53ded9256af639e7fb..96e62b8fd6b10d063f7bdc4cc2ee0ba28ed9991a 100644 (file)
@@ -30,7 +30,7 @@ MODULE_ALIAS("ip6t_statistic");
 static DEFINE_SPINLOCK(nth_lock);
 
 static bool
-statistic_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+statistic_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_statistic_info *info = par->matchinfo;
        bool ret = info->flags & XT_STATISTIC_INVERT;
index fd5dc5016a17999289b8859d35f0a740408f6351..d3c48b14ab94c09d74f0c74e62b94ed5fcb58af7 100644 (file)
@@ -23,7 +23,7 @@ MODULE_ALIAS("ipt_string");
 MODULE_ALIAS("ip6t_string");
 
 static bool
-string_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+string_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_string_info *conf = par->matchinfo;
        struct ts_state state;
index 5c8a7b435d66c971b860321df3eaea724f9f10fa..f90728f6b8a4c41e374d428fd798fef1fa3d2063 100644 (file)
@@ -25,7 +25,7 @@ MODULE_ALIAS("ipt_tcpmss");
 MODULE_ALIAS("ip6t_tcpmss");
 
 static bool
-tcpmss_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+tcpmss_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_tcpmss_match_info *info = par->matchinfo;
        const struct tcphdr *th;
index 19c31d4c2ba6abcae8255b61e43fb9af66fd2d69..dedde33c9db6786654259b81ef5c09228f218962 100644 (file)
@@ -62,8 +62,7 @@ tcp_find_option(u_int8_t option,
        return invert;
 }
 
-static bool tcp_mt(const struct sk_buff *skb,
-                  const struct xt_action_param *par)
+static bool tcp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct tcphdr *th;
        struct tcphdr _tcph;
@@ -129,8 +128,7 @@ static int tcp_mt_check(const struct xt_mtchk_param *par)
        return (tcpinfo->invflags & ~XT_TCP_INV_MASK) ? -EINVAL : 0;
 }
 
-static bool udp_mt(const struct sk_buff *skb,
-                  const struct xt_action_param *par)
+static bool udp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct udphdr *uh;
        struct udphdr _udph;
index ffdb8fac0be1822340cc798c807333c21f8cf72c..79234bb19d05fc56a2fed75f7fa64f1f755c60d6 100644 (file)
@@ -152,7 +152,7 @@ static void localtime_3(struct xtm *r, time_t time)
 }
 
 static bool
-time_mt(const struct sk_buff *skb, const struct xt_action_param *par)
+time_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_time_info *info = par->matchinfo;
        unsigned int packet_time;
index f62797b1ddb51f04549d99d58a6021d543047d4b..a95b50342dbb1d1f1a43663e46104e031f4f295a 100644 (file)
@@ -86,8 +86,7 @@ static bool u32_match_it(const struct xt_u32 *data,
        return true;
 }
 
-static bool u32_mt(const struct sk_buff *skb,
-                  const struct xt_action_param *par)
+static bool u32_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct xt_u32 *data = par->matchinfo;
        bool ret;