Skip to content

Commit

Permalink
netfilter: xtables: substitute temporary defines by final name
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
  • Loading branch information
Jan Engelhardt committed May 11, 2010
1 parent de74c16 commit 4b560b4
Show file tree
Hide file tree
Showing 97 changed files with 133 additions and 123 deletions.
2 changes: 0 additions & 2 deletions include/linux/netfilter/x_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ struct xt_counters_info {

#include <linux/netdevice.h>

#define xt_match_param xt_action_param
#define xt_target_param xt_action_param
/**
* struct xt_action_param - parameters for matches/targets
*
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_802_3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_match_param *par)
ebt_802_3_mt(const struct sk_buff *skb, const 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);
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_among.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_match_param *par)
ebt_among_mt(const struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_among_info *info = par->matchinfo;
const char *dmac, *smac;
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_arp.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/netfilter_bridge/ebt_arp.h>

static bool
ebt_arp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
ebt_arp_mt(const struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_arp_info *info = par->matchinfo;
const struct arphdr *ah;
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_arpreply.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/netfilter_bridge/ebt_arpreply.h>

static unsigned int
ebt_arpreply_tg(struct sk_buff *skb, const struct xt_target_param *par)
ebt_arpreply_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_arpreply_info *info = par->targinfo;
const __be32 *siptr, *diptr;
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_dnat.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <linux/netfilter_bridge/ebt_nat.h>

static unsigned int
ebt_dnat_tg(struct sk_buff *skb, const struct xt_target_param *par)
ebt_dnat_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_nat_info *info = par->targinfo;

Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct tcpudphdr {
};

static bool
ebt_ip_mt(const struct sk_buff *skb, const struct xt_match_param *par)
ebt_ip_mt(const struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_ip_info *info = par->matchinfo;
const struct iphdr *ih;
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_ip6.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct tcpudphdr {
};

static bool
ebt_ip6_mt(const struct sk_buff *skb, const struct xt_match_param *par)
ebt_ip6_mt(const struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_ip6_info *info = par->matchinfo;
const struct ipv6hdr *ih6;
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_limit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_match_param *par)
ebt_limit_mt(const struct sk_buff *skb, const struct xt_action_param *par)
{
struct ebt_limit_info *info = (void *)par->matchinfo;
unsigned long now = jiffies;
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum,
}

static unsigned int
ebt_log_tg(struct sk_buff *skb, const struct xt_target_param *par)
ebt_log_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_log_info *info = par->targinfo;
struct nf_loginfo li;
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_mark.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <linux/netfilter_bridge/ebt_mark_t.h>

static unsigned int
ebt_mark_tg(struct sk_buff *skb, const struct xt_target_param *par)
ebt_mark_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_mark_t_info *info = par->targinfo;
int action = info->target & -16;
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_mark_m.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_match_param *par)
ebt_mark_mt(const struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_mark_m_info *info = par->matchinfo;

Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_nflog.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <net/netfilter/nf_log.h>

static unsigned int
ebt_nflog_tg(struct sk_buff *skb, const struct xt_target_param *par)
ebt_nflog_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_nflog_info *info = par->targinfo;
struct nf_loginfo li;
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_pkttype.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <linux/netfilter_bridge/ebt_pkttype.h>

static bool
ebt_pkttype_mt(const struct sk_buff *skb, const struct xt_match_param *par)
ebt_pkttype_mt(const struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_pkttype_info *info = par->matchinfo;

Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_redirect.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/netfilter_bridge/ebt_redirect.h>

static unsigned int
ebt_redirect_tg(struct sk_buff *skb, const struct xt_target_param *par)
ebt_redirect_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_redirect_info *info = par->targinfo;

Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_snat.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <linux/netfilter_bridge/ebt_nat.h>

static unsigned int
ebt_snat_tg(struct sk_buff *skb, const struct xt_target_param *par)
ebt_snat_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_nat_info *info = par->targinfo;

Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_stp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_match_param *par)
ebt_stp_mt(const struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_stp_info *info = par->matchinfo;
const struct stp_header *sp;
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_ulog.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ static void ebt_log_packet(u_int8_t pf, unsigned int hooknum,
}

static unsigned int
ebt_ulog_tg(struct sk_buff *skb, const struct xt_target_param *par)
ebt_ulog_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
ebt_ulog_packet(par->hooknum, skb, par->in, par->out,
par->targinfo, NULL);
Expand Down
2 changes: 1 addition & 1 deletion net/bridge/netfilter/ebt_vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_match_param *par)
ebt_vlan_mt(const struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ebt_vlan_info *info = par->matchinfo;
const struct vlan_hdr *fp;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/arp_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static inline int arp_checkentry(const struct arpt_arp *arp)
}

static unsigned int
arpt_error(struct sk_buff *skb, const struct xt_target_param *par)
arpt_error(struct sk_buff *skb, const struct xt_action_param *par)
{
if (net_ratelimit())
printk("arp_tables: error: '%s'\n",
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/arpt_mangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");
MODULE_DESCRIPTION("arptables arp payload mangle target");

static unsigned int
target(struct sk_buff *skb, const struct xt_target_param *par)
target(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct arpt_mangle *mangle = par->targinfo;
const struct arphdr *arp;
Expand Down
4 changes: 2 additions & 2 deletions net/ipv4/netfilter/ip_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ ip_checkentry(const struct ipt_ip *ip)
}

static unsigned int
ipt_error(struct sk_buff *skb, const struct xt_target_param *par)
ipt_error(struct sk_buff *skb, const struct xt_action_param *par)
{
if (net_ratelimit())
pr_info("error: `%s'\n", (const char *)par->targinfo);
Expand Down Expand Up @@ -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_match_param *par)
icmp_match(const struct sk_buff *skb, const struct xt_action_param *par)
{
const struct icmphdr *ic;
struct icmphdr _icmph;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_CLUSTERIP.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ clusterip_responsible(const struct clusterip_config *config, u_int32_t hash)
***********************************************************************/

static unsigned int
clusterip_tg(struct sk_buff *skb, const struct xt_target_param *par)
clusterip_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ipt_clusterip_tgt_info *cipinfo = par->targinfo;
struct nf_conn *ct;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_ECN.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ set_ect_tcp(struct sk_buff *skb, const struct ipt_ECN_info *einfo)
}

static unsigned int
ecn_tg(struct sk_buff *skb, const struct xt_target_param *par)
ecn_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ipt_ECN_info *einfo = par->targinfo;

Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_LOG.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ ipt_log_packet(u_int8_t pf,
}

static unsigned int
log_tg(struct sk_buff *skb, const struct xt_target_param *par)
log_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ipt_log_info *loginfo = par->targinfo;
struct nf_loginfo li;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_MASQUERADE.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static int masquerade_tg_check(const struct xt_tgchk_param *par)
}

static unsigned int
masquerade_tg(struct sk_buff *skb, const struct xt_target_param *par)
masquerade_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
struct nf_conn *ct;
struct nf_conn_nat *nat;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_NETMAP.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static int netmap_tg_check(const struct xt_tgchk_param *par)
}

static unsigned int
netmap_tg(struct sk_buff *skb, const struct xt_target_param *par)
netmap_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
struct nf_conn *ct;
enum ip_conntrack_info ctinfo;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_REDIRECT.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static int redirect_tg_check(const struct xt_tgchk_param *par)
}

static unsigned int
redirect_tg(struct sk_buff *skb, const struct xt_target_param *par)
redirect_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
struct nf_conn *ct;
enum ip_conntrack_info ctinfo;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_REJECT.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static inline void send_unreach(struct sk_buff *skb_in, int code)
}

static unsigned int
reject_tg(struct sk_buff *skb, const struct xt_target_param *par)
reject_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ipt_reject_info *reject = par->targinfo;

Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_ULOG.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ static void ipt_ulog_packet(unsigned int hooknum,
}

static unsigned int
ulog_tg(struct sk_buff *skb, const struct xt_target_param *par)
ulog_tg(struct sk_buff *skb, const struct xt_action_param *par)
{
ipt_ulog_packet(par->hooknum, skb, par->in, par->out,
par->targinfo, NULL);
Expand Down
4 changes: 2 additions & 2 deletions net/ipv4/netfilter/ipt_addrtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_match_param *par)
addrtype_mt_v0(const struct sk_buff *skb, const struct xt_action_param *par)
{
struct net *net = dev_net(par->in ? par->in : par->out);
const struct ipt_addrtype_info *info = par->matchinfo;
Expand All @@ -48,7 +48,7 @@ addrtype_mt_v0(const struct sk_buff *skb, const struct xt_match_param *par)
}

static bool
addrtype_mt_v1(const struct sk_buff *skb, const struct xt_match_param *par)
addrtype_mt_v1(const struct sk_buff *skb, const 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;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_ah.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_match_param *par)
static bool ah_mt(const struct sk_buff *skb, const struct xt_action_param *par)
{
struct ip_auth_hdr _ahdr;
const struct ip_auth_hdr *ah;
Expand Down
3 changes: 2 additions & 1 deletion net/ipv4/netfilter/ipt_ecn.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ static inline bool match_tcp(const struct sk_buff *skb,
return true;
}

static bool ecn_mt(const struct sk_buff *skb, const struct xt_match_param *par)
static bool ecn_mt(const struct sk_buff *skb,
const struct xt_action_param *par)
{
const struct ipt_ecn_info *info = par->matchinfo;

Expand Down
4 changes: 2 additions & 2 deletions net/ipv4/netfilter/nf_nat_rule.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static const struct xt_table nat_table = {

/* Source NAT */
static unsigned int
ipt_snat_target(struct sk_buff *skb, const struct xt_target_param *par)
ipt_snat_target(struct sk_buff *skb, const struct xt_action_param *par)
{
struct nf_conn *ct;
enum ip_conntrack_info ctinfo;
Expand All @@ -58,7 +58,7 @@ ipt_snat_target(struct sk_buff *skb, const struct xt_target_param *par)
}

static unsigned int
ipt_dnat_target(struct sk_buff *skb, const struct xt_target_param *par)
ipt_dnat_target(struct sk_buff *skb, const struct xt_action_param *par)
{
struct nf_conn *ct;
enum ip_conntrack_info ctinfo;
Expand Down
4 changes: 2 additions & 2 deletions net/ipv6/netfilter/ip6_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ ip6_checkentry(const struct ip6t_ip6 *ipv6)
}

static unsigned int
ip6t_error(struct sk_buff *skb, const struct xt_target_param *par)
ip6t_error(struct sk_buff *skb, const struct xt_action_param *par)
{
if (net_ratelimit())
pr_info("error: `%s'\n", (const char *)par->targinfo);
Expand Down Expand Up @@ -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_match_param *par)
icmp6_match(const struct sk_buff *skb, const struct xt_action_param *par)
{
const struct icmp6hdr *ic;
struct icmp6hdr _icmph;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/netfilter/ip6t_LOG.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ ip6t_log_packet(u_int8_t pf,
}

static unsigned int
log_tg6(struct sk_buff *skb, const struct xt_target_param *par)
log_tg6(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ip6t_log_info *loginfo = par->targinfo;
struct nf_loginfo li;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/netfilter/ip6t_REJECT.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ send_unreach(struct net *net, struct sk_buff *skb_in, unsigned char code,
}

static unsigned int
reject_tg6(struct sk_buff *skb, const struct xt_target_param *par)
reject_tg6(struct sk_buff *skb, const struct xt_action_param *par)
{
const struct ip6t_reject_info *reject = par->targinfo;
struct net *net = dev_net((par->in != NULL) ? par->in : par->out);
Expand Down
3 changes: 2 additions & 1 deletion net/ipv6/netfilter/ip6t_ah.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ 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_match_param *par)
static bool ah_mt6(const struct sk_buff *skb,
const struct xt_action_param *par)
{
struct ip_auth_hdr _ah;
const struct ip_auth_hdr *ah;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/netfilter/ip6t_eui64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_match_param *par)
eui64_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
{
unsigned char eui64[8];

Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/netfilter/ip6t_frag.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_match_param *par)
frag_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
{
struct frag_hdr _frag;
const struct frag_hdr *fh;
Expand Down
Loading

0 comments on commit 4b560b4

Please sign in to comment.