netfilter: xtables: substitute temporary defines by final name
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
This commit is contained in:
@@ -27,7 +27,7 @@ MODULE_ALIAS("ipt_CLASSIFY");
|
||||
MODULE_ALIAS("ip6t_CLASSIFY");
|
||||
|
||||
static unsigned int
|
||||
classify_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
classify_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_classify_target_info *clinfo = par->targinfo;
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ static void secmark_restore(struct sk_buff *skb)
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
connsecmark_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
connsecmark_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_connsecmark_target_info *info = par->targinfo;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <net/netfilter/nf_conntrack_zones.h>
|
||||
|
||||
static unsigned int xt_ct_target(struct sk_buff *skb,
|
||||
const struct xt_target_param *par)
|
||||
const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_ct_target_info *info = par->targinfo;
|
||||
struct nf_conn *ct = info->ct;
|
||||
|
||||
@@ -28,7 +28,7 @@ MODULE_ALIAS("ipt_TOS");
|
||||
MODULE_ALIAS("ip6t_TOS");
|
||||
|
||||
static unsigned int
|
||||
dscp_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
dscp_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_DSCP_info *dinfo = par->targinfo;
|
||||
u_int8_t dscp = ipv4_get_dsfield(ip_hdr(skb)) >> XT_DSCP_SHIFT;
|
||||
@@ -45,7 +45,7 @@ dscp_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
dscp_tg6(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
dscp_tg6(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_DSCP_info *dinfo = par->targinfo;
|
||||
u_int8_t dscp = ipv6_get_dsfield(ipv6_hdr(skb)) >> XT_DSCP_SHIFT;
|
||||
@@ -72,7 +72,7 @@ static int dscp_tg_check(const struct xt_tgchk_param *par)
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
tos_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
tos_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_tos_target_info *info = par->targinfo;
|
||||
struct iphdr *iph = ip_hdr(skb);
|
||||
@@ -92,7 +92,7 @@ tos_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
tos_tg6(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
tos_tg6(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_tos_target_info *info = par->targinfo;
|
||||
struct ipv6hdr *iph = ipv6_hdr(skb);
|
||||
|
||||
@@ -26,7 +26,7 @@ MODULE_DESCRIPTION("Xtables: Hoplimit/TTL Limit field modification target");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
static unsigned int
|
||||
ttl_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
ttl_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
struct iphdr *iph;
|
||||
const struct ipt_TTL_info *info = par->targinfo;
|
||||
@@ -66,7 +66,7 @@ ttl_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
hl_tg6(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
hl_tg6(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
struct ipv6hdr *ip6h;
|
||||
const struct ip6t_HL_info *info = par->targinfo;
|
||||
|
||||
@@ -49,7 +49,7 @@ struct xt_led_info_internal {
|
||||
};
|
||||
|
||||
static unsigned int
|
||||
led_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
led_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_led_info *ledinfo = par->targinfo;
|
||||
struct xt_led_info_internal *ledinternal = ledinfo->internal_data;
|
||||
|
||||
@@ -22,7 +22,7 @@ MODULE_ALIAS("ipt_NFLOG");
|
||||
MODULE_ALIAS("ip6t_NFLOG");
|
||||
|
||||
static unsigned int
|
||||
nflog_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
nflog_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_nflog_info *info = par->targinfo;
|
||||
struct nf_loginfo li;
|
||||
|
||||
@@ -31,7 +31,7 @@ static u32 jhash_initval __read_mostly;
|
||||
static bool rnd_inited __read_mostly;
|
||||
|
||||
static unsigned int
|
||||
nfqueue_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
nfqueue_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_NFQ_info *tinfo = par->targinfo;
|
||||
|
||||
@@ -65,7 +65,7 @@ static u32 hash_v6(const struct sk_buff *skb)
|
||||
#endif
|
||||
|
||||
static unsigned int
|
||||
nfqueue_tg_v1(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
nfqueue_tg_v1(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_NFQ_info_v1 *info = par->targinfo;
|
||||
u32 queue = info->queuenum;
|
||||
|
||||
@@ -13,7 +13,7 @@ MODULE_ALIAS("ipt_NOTRACK");
|
||||
MODULE_ALIAS("ip6t_NOTRACK");
|
||||
|
||||
static unsigned int
|
||||
notrack_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
notrack_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
/* Previously seen (loopback)? Ignore. */
|
||||
if (skb->nfct != NULL)
|
||||
|
||||
@@ -73,7 +73,7 @@ void xt_rateest_put(struct xt_rateest *est)
|
||||
EXPORT_SYMBOL_GPL(xt_rateest_put);
|
||||
|
||||
static unsigned int
|
||||
xt_rateest_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
xt_rateest_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_rateest_target_info *info = par->targinfo;
|
||||
struct gnet_stats_basic_packed *stats = &info->est->bstats;
|
||||
|
||||
@@ -30,7 +30,7 @@ MODULE_ALIAS("ip6t_SECMARK");
|
||||
static u8 mode;
|
||||
|
||||
static unsigned int
|
||||
secmark_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
secmark_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
u32 secmark = 0;
|
||||
const struct xt_secmark_target_info *info = par->targinfo;
|
||||
|
||||
@@ -172,7 +172,7 @@ static u_int32_t tcpmss_reverse_mtu(const struct sk_buff *skb,
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
tcpmss_tg4(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
tcpmss_tg4(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
struct iphdr *iph = ip_hdr(skb);
|
||||
__be16 newlen;
|
||||
@@ -195,7 +195,7 @@ tcpmss_tg4(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
|
||||
#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
|
||||
static unsigned int
|
||||
tcpmss_tg6(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
tcpmss_tg6(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
struct ipv6hdr *ipv6h = ipv6_hdr(skb);
|
||||
u8 nexthdr;
|
||||
|
||||
@@ -74,7 +74,7 @@ tcpoptstrip_mangle_packet(struct sk_buff *skb,
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
tcpoptstrip_tg4(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
tcpoptstrip_tg4(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
return tcpoptstrip_mangle_packet(skb, par->targinfo, ip_hdrlen(skb),
|
||||
sizeof(struct iphdr) + sizeof(struct tcphdr));
|
||||
@@ -82,7 +82,7 @@ tcpoptstrip_tg4(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
|
||||
#if defined(CONFIG_IP6_NF_MANGLE) || defined(CONFIG_IP6_NF_MANGLE_MODULE)
|
||||
static unsigned int
|
||||
tcpoptstrip_tg6(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
tcpoptstrip_tg6(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
struct ipv6hdr *ipv6h = ipv6_hdr(skb);
|
||||
int tcphoff;
|
||||
|
||||
@@ -84,7 +84,7 @@ tee_tg_route4(struct sk_buff *skb, const struct xt_tee_tginfo *info)
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
tee_tg4(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
tee_tg4(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_tee_tginfo *info = par->targinfo;
|
||||
struct iphdr *iph;
|
||||
@@ -165,7 +165,7 @@ tee_tg_route6(struct sk_buff *skb, const struct xt_tee_tginfo *info)
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
tee_tg6(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
tee_tg6(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_tee_tginfo *info = par->targinfo;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <net/netfilter/nf_tproxy_core.h>
|
||||
|
||||
static unsigned int
|
||||
tproxy_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
tproxy_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct iphdr *iph = ip_hdr(skb);
|
||||
const struct xt_tproxy_target_info *tgi = par->targinfo;
|
||||
|
||||
@@ -11,7 +11,7 @@ MODULE_ALIAS("ipt_TRACE");
|
||||
MODULE_ALIAS("ip6t_TRACE");
|
||||
|
||||
static unsigned int
|
||||
trace_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
trace_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
skb->nf_trace = 1;
|
||||
return XT_CONTINUE;
|
||||
|
||||
@@ -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_match_param *par)
|
||||
xt_cluster_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
struct sk_buff *pskb = (struct sk_buff *)skb;
|
||||
const struct xt_cluster_match_info *info = par->matchinfo;
|
||||
|
||||
@@ -16,7 +16,7 @@ MODULE_ALIAS("ipt_comment");
|
||||
MODULE_ALIAS("ip6t_comment");
|
||||
|
||||
static bool
|
||||
comment_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
comment_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
/* We always match */
|
||||
return true;
|
||||
|
||||
@@ -18,7 +18,7 @@ MODULE_ALIAS("ipt_connbytes");
|
||||
MODULE_ALIAS("ip6t_connbytes");
|
||||
|
||||
static bool
|
||||
connbytes_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
connbytes_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_connbytes_info *sinfo = par->matchinfo;
|
||||
const struct nf_conn *ct;
|
||||
|
||||
@@ -173,7 +173,7 @@ static int count_them(struct net *net,
|
||||
}
|
||||
|
||||
static bool
|
||||
connlimit_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
connlimit_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
struct net *net = dev_net(par->in ? par->in : par->out);
|
||||
const struct xt_connlimit_info *info = par->matchinfo;
|
||||
|
||||
@@ -37,7 +37,7 @@ MODULE_ALIAS("ipt_connmark");
|
||||
MODULE_ALIAS("ip6t_connmark");
|
||||
|
||||
static unsigned int
|
||||
connmark_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
connmark_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_connmark_tginfo1 *info = par->targinfo;
|
||||
enum ip_conntrack_info ctinfo;
|
||||
@@ -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_match_param *par)
|
||||
connmark_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_connmark_mtinfo1 *info = par->matchinfo;
|
||||
enum ip_conntrack_info ctinfo;
|
||||
|
||||
@@ -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_match_param *par,
|
||||
conntrack_mt(const struct sk_buff *skb, const 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_match_param *par,
|
||||
}
|
||||
|
||||
static bool
|
||||
conntrack_mt_v1(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
conntrack_mt_v1(const struct sk_buff *skb, const 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_match_param *par)
|
||||
}
|
||||
|
||||
static bool
|
||||
conntrack_mt_v2(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
conntrack_mt_v2(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_conntrack_mtinfo2 *info = par->matchinfo;
|
||||
|
||||
|
||||
@@ -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_match_param *par)
|
||||
dccp_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_dccp_info *info = par->matchinfo;
|
||||
const struct dccp_hdr *dh;
|
||||
|
||||
@@ -25,7 +25,7 @@ MODULE_ALIAS("ipt_tos");
|
||||
MODULE_ALIAS("ip6t_tos");
|
||||
|
||||
static bool
|
||||
dscp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
dscp_mt(const struct sk_buff *skb, const 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_match_param *par)
|
||||
}
|
||||
|
||||
static bool
|
||||
dscp_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
dscp_mt6(const struct sk_buff *skb, const 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,7 +54,8 @@ 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_match_param *par)
|
||||
static bool tos_mt(const struct sk_buff *skb,
|
||||
const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_tos_match_info *info = par->matchinfo;
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@ 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_match_param *par)
|
||||
static bool esp_mt(const struct sk_buff *skb,
|
||||
const struct xt_action_param *par)
|
||||
{
|
||||
const struct ip_esp_hdr *eh;
|
||||
struct ip_esp_hdr _esp;
|
||||
|
||||
@@ -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_match_param *par)
|
||||
hashlimit_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_hashlimit_mtinfo1 *info = par->matchinfo;
|
||||
struct xt_hashlimit_htable *hinfo = info->hinfo;
|
||||
|
||||
@@ -24,7 +24,7 @@ MODULE_ALIAS("ip6t_helper");
|
||||
|
||||
|
||||
static bool
|
||||
helper_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
helper_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_helper_info *info = par->matchinfo;
|
||||
const struct nf_conn *ct;
|
||||
|
||||
@@ -25,7 +25,8 @@ MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("ipt_ttl");
|
||||
MODULE_ALIAS("ip6t_hl");
|
||||
|
||||
static bool ttl_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
static bool ttl_mt(const struct sk_buff *skb,
|
||||
const struct xt_action_param *par)
|
||||
{
|
||||
const struct ipt_ttl_info *info = par->matchinfo;
|
||||
const u8 ttl = ip_hdr(skb)->ttl;
|
||||
@@ -44,7 +45,8 @@ static bool ttl_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool hl_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
static bool hl_mt6(const struct sk_buff *skb,
|
||||
const struct xt_action_param *par)
|
||||
{
|
||||
const struct ip6t_hl_info *info = par->matchinfo;
|
||||
const struct ipv6hdr *ip6h = ipv6_hdr(skb);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <linux/netfilter/xt_iprange.h>
|
||||
|
||||
static bool
|
||||
iprange_mt4(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
iprange_mt4(const struct sk_buff *skb, const 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_match_param *par)
|
||||
iprange_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_iprange_mtinfo *info = par->matchinfo;
|
||||
const struct ipv6hdr *iph = ipv6_hdr(skb);
|
||||
|
||||
@@ -21,7 +21,7 @@ MODULE_ALIAS("ipt_length");
|
||||
MODULE_ALIAS("ip6t_length");
|
||||
|
||||
static bool
|
||||
length_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
length_mt(const struct sk_buff *skb, const 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_match_param *par)
|
||||
}
|
||||
|
||||
static bool
|
||||
length_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
length_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_length_info *info = par->matchinfo;
|
||||
const u_int16_t pktlen = ntohs(ipv6_hdr(skb)->payload_len) +
|
||||
|
||||
@@ -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_match_param *par)
|
||||
limit_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_rateinfo *r = par->matchinfo;
|
||||
struct xt_limit_priv *priv = r->master;
|
||||
|
||||
@@ -25,7 +25,8 @@ 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_match_param *par)
|
||||
static bool mac_mt(const struct sk_buff *skb,
|
||||
const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_mac_info *info = par->matchinfo;
|
||||
bool ret;
|
||||
|
||||
@@ -25,7 +25,7 @@ MODULE_ALIAS("ipt_MARK");
|
||||
MODULE_ALIAS("ip6t_MARK");
|
||||
|
||||
static unsigned int
|
||||
mark_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
mark_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_mark_tginfo2 *info = par->targinfo;
|
||||
|
||||
@@ -34,7 +34,7 @@ mark_tg(struct sk_buff *skb, const struct xt_target_param *par)
|
||||
}
|
||||
|
||||
static bool
|
||||
mark_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
mark_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_mark_mtinfo1 *info = par->matchinfo;
|
||||
|
||||
|
||||
@@ -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_match_param *par)
|
||||
multiport_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const __be16 *pptr;
|
||||
__be16 _ports[2];
|
||||
|
||||
@@ -193,8 +193,8 @@ static inline int xt_osf_ttl(const struct sk_buff *skb, const struct xt_osf_info
|
||||
return ip->ttl == f_ttl;
|
||||
}
|
||||
|
||||
static bool xt_osf_match_packet(const struct sk_buff *skb,
|
||||
const struct xt_match_param *p)
|
||||
static bool
|
||||
xt_osf_match_packet(const struct sk_buff *skb, const struct xt_action_param *p)
|
||||
{
|
||||
const struct xt_osf_info *info = p->matchinfo;
|
||||
const struct iphdr *ip = ip_hdr(skb);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <linux/netfilter/xt_owner.h>
|
||||
|
||||
static bool
|
||||
owner_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
owner_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_owner_match_info *info = par->matchinfo;
|
||||
const struct file *filp;
|
||||
|
||||
@@ -22,7 +22,7 @@ MODULE_ALIAS("ip6t_physdev");
|
||||
|
||||
|
||||
static bool
|
||||
physdev_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
physdev_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
|
||||
const struct xt_physdev_info *info = par->matchinfo;
|
||||
|
||||
@@ -23,7 +23,7 @@ MODULE_ALIAS("ipt_pkttype");
|
||||
MODULE_ALIAS("ip6t_pkttype");
|
||||
|
||||
static bool
|
||||
pkttype_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
pkttype_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_pkttype_info *info = par->matchinfo;
|
||||
u_int8_t type;
|
||||
|
||||
@@ -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_match_param *par)
|
||||
policy_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_policy_info *info = par->matchinfo;
|
||||
int ret;
|
||||
|
||||
@@ -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_match_param *par)
|
||||
quota_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
struct xt_quota_info *q = (void *)par->matchinfo;
|
||||
struct xt_quota_priv *priv = q->master;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
static bool
|
||||
xt_rateest_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
xt_rateest_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_rateest_match_info *info = par->matchinfo;
|
||||
struct gnet_stats_rate_est *r;
|
||||
|
||||
@@ -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_match_param *par)
|
||||
realm_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_realm_info *info = par->matchinfo;
|
||||
const struct dst_entry *dst = skb_dst(skb);
|
||||
|
||||
@@ -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_match_param *par)
|
||||
recent_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
struct net *net = dev_net(par->in ? par->in : par->out);
|
||||
struct recent_net *recent_net = recent_pernet(net);
|
||||
|
||||
@@ -114,7 +114,7 @@ match_packet(const struct sk_buff *skb,
|
||||
}
|
||||
|
||||
static bool
|
||||
sctp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
sctp_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_sctp_info *info = par->matchinfo;
|
||||
const sctp_sctphdr_t *sh;
|
||||
|
||||
@@ -88,7 +88,7 @@ extract_icmp_fields(const struct sk_buff *skb,
|
||||
|
||||
|
||||
static bool
|
||||
socket_match(const struct sk_buff *skb, const struct xt_match_param *par,
|
||||
socket_match(const struct sk_buff *skb, const 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_match_param *par,
|
||||
}
|
||||
|
||||
static bool
|
||||
socket_mt_v0(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
socket_mt_v0(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
return socket_match(skb, par, NULL);
|
||||
}
|
||||
|
||||
static bool
|
||||
socket_mt_v1(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
socket_mt_v1(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
return socket_match(skb, par, par->matchinfo);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ MODULE_ALIAS("ipt_state");
|
||||
MODULE_ALIAS("ip6t_state");
|
||||
|
||||
static bool
|
||||
state_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
state_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_state_info *sinfo = par->matchinfo;
|
||||
enum ip_conntrack_info ctinfo;
|
||||
|
||||
@@ -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_match_param *par)
|
||||
statistic_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_statistic_info *info = par->matchinfo;
|
||||
bool ret = info->flags & XT_STATISTIC_INVERT;
|
||||
|
||||
@@ -23,7 +23,7 @@ MODULE_ALIAS("ipt_string");
|
||||
MODULE_ALIAS("ip6t_string");
|
||||
|
||||
static bool
|
||||
string_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
string_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_string_info *conf = par->matchinfo;
|
||||
struct ts_state state;
|
||||
|
||||
@@ -25,7 +25,7 @@ MODULE_ALIAS("ipt_tcpmss");
|
||||
MODULE_ALIAS("ip6t_tcpmss");
|
||||
|
||||
static bool
|
||||
tcpmss_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
tcpmss_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_tcpmss_match_info *info = par->matchinfo;
|
||||
const struct tcphdr *th;
|
||||
|
||||
@@ -62,7 +62,8 @@ tcp_find_option(u_int8_t option,
|
||||
return invert;
|
||||
}
|
||||
|
||||
static bool tcp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
static bool tcp_mt(const struct sk_buff *skb,
|
||||
const struct xt_action_param *par)
|
||||
{
|
||||
const struct tcphdr *th;
|
||||
struct tcphdr _tcph;
|
||||
@@ -128,7 +129,8 @@ 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_match_param *par)
|
||||
static bool udp_mt(const struct sk_buff *skb,
|
||||
const struct xt_action_param *par)
|
||||
{
|
||||
const struct udphdr *uh;
|
||||
struct udphdr _udph;
|
||||
|
||||
@@ -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_match_param *par)
|
||||
time_mt(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_time_info *info = par->matchinfo;
|
||||
unsigned int packet_time;
|
||||
|
||||
@@ -86,7 +86,8 @@ static bool u32_match_it(const struct xt_u32 *data,
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool u32_mt(const struct sk_buff *skb, const struct xt_match_param *par)
|
||||
static bool u32_mt(const struct sk_buff *skb,
|
||||
const struct xt_action_param *par)
|
||||
{
|
||||
const struct xt_u32 *data = par->matchinfo;
|
||||
bool ret;
|
||||
|
||||
Reference in New Issue
Block a user