Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
This commit is contained in:
@@ -359,7 +359,7 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
|
||||
},
|
||||
.proto = 0,
|
||||
};
|
||||
struct in_device *in_dev = in_dev_get(dev);
|
||||
struct in_device *in_dev = __in_dev_get_rcu(dev);
|
||||
|
||||
/* If err equals -EHOSTUNREACH the error is due to a
|
||||
* martian destination or due to the fact that
|
||||
|
@@ -50,14 +50,6 @@ struct arppayload
|
||||
unsigned char ip_dst[4];
|
||||
};
|
||||
|
||||
static void print_MAC(const unsigned char *p)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ETH_ALEN; i++, p++)
|
||||
printk("%02x%c", *p, i == ETH_ALEN - 1 ? ' ':':');
|
||||
}
|
||||
|
||||
static void
|
||||
print_ports(const struct sk_buff *skb, uint8_t protocol, int offset)
|
||||
{
|
||||
@@ -88,14 +80,11 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum,
|
||||
unsigned int bitmask;
|
||||
|
||||
spin_lock_bh(&ebt_log_lock);
|
||||
printk("<%c>%s IN=%s OUT=%s MAC source = ", '0' + loginfo->u.log.level,
|
||||
prefix, in ? in->name : "", out ? out->name : "");
|
||||
|
||||
print_MAC(eth_hdr(skb)->h_source);
|
||||
printk("MAC dest = ");
|
||||
print_MAC(eth_hdr(skb)->h_dest);
|
||||
|
||||
printk("proto = 0x%04x", ntohs(eth_hdr(skb)->h_proto));
|
||||
printk("<%c>%s IN=%s OUT=%s MAC source = %pM MAC dest = %pM proto = 0x%04x",
|
||||
'0' + loginfo->u.log.level, prefix,
|
||||
in ? in->name : "", out ? out->name : "",
|
||||
eth_hdr(skb)->h_source, eth_hdr(skb)->h_dest,
|
||||
ntohs(eth_hdr(skb)->h_proto));
|
||||
|
||||
if (loginfo->type == NF_LOG_TYPE_LOG)
|
||||
bitmask = loginfo->u.log.logflags;
|
||||
@@ -171,12 +160,8 @@ ebt_log_packet(u_int8_t pf, unsigned int hooknum,
|
||||
printk(" INCOMPLETE ARP payload");
|
||||
goto out;
|
||||
}
|
||||
printk(" ARP MAC SRC=");
|
||||
print_MAC(ap->mac_src);
|
||||
printk(" ARP IP SRC=%pI4", ap->ip_src);
|
||||
printk(" ARP MAC DST=");
|
||||
print_MAC(ap->mac_dst);
|
||||
printk(" ARP IP DST=%pI4", ap->ip_dst);
|
||||
printk(" ARP MAC SRC=%pM ARP IP SRC=%pI4 ARP MAC DST=%pM ARP IP DST=%pI4",
|
||||
ap->mac_src, ap->ip_src, ap->mac_dst, ap->ip_dst);
|
||||
}
|
||||
}
|
||||
out:
|
||||
|
@@ -266,7 +266,7 @@ static bool ebt_ulog_tg_check(const struct xt_tgchk_param *par)
|
||||
if (uloginfo->qthreshold > EBT_ULOG_MAX_QLEN)
|
||||
uloginfo->qthreshold = EBT_ULOG_MAX_QLEN;
|
||||
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct xt_target ebt_ulog_tg_reg __read_mostly = {
|
||||
|
@@ -41,7 +41,7 @@ static int check(const struct ebt_table_info *info, unsigned int valid_hooks)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ebt_table broute_table =
|
||||
static const struct ebt_table broute_table =
|
||||
{
|
||||
.name = "broute",
|
||||
.table = &initial_table,
|
||||
|
@@ -50,7 +50,7 @@ static int check(const struct ebt_table_info *info, unsigned int valid_hooks)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ebt_table frame_filter =
|
||||
static const struct ebt_table frame_filter =
|
||||
{
|
||||
.name = "filter",
|
||||
.table = &initial_table,
|
||||
@@ -77,21 +77,21 @@ static struct nf_hook_ops ebt_ops_filter[] __read_mostly = {
|
||||
{
|
||||
.hook = ebt_in_hook,
|
||||
.owner = THIS_MODULE,
|
||||
.pf = PF_BRIDGE,
|
||||
.pf = NFPROTO_BRIDGE,
|
||||
.hooknum = NF_BR_LOCAL_IN,
|
||||
.priority = NF_BR_PRI_FILTER_BRIDGED,
|
||||
},
|
||||
{
|
||||
.hook = ebt_in_hook,
|
||||
.owner = THIS_MODULE,
|
||||
.pf = PF_BRIDGE,
|
||||
.pf = NFPROTO_BRIDGE,
|
||||
.hooknum = NF_BR_FORWARD,
|
||||
.priority = NF_BR_PRI_FILTER_BRIDGED,
|
||||
},
|
||||
{
|
||||
.hook = ebt_out_hook,
|
||||
.owner = THIS_MODULE,
|
||||
.pf = PF_BRIDGE,
|
||||
.pf = NFPROTO_BRIDGE,
|
||||
.hooknum = NF_BR_LOCAL_OUT,
|
||||
.priority = NF_BR_PRI_FILTER_OTHER,
|
||||
},
|
||||
|
@@ -77,21 +77,21 @@ static struct nf_hook_ops ebt_ops_nat[] __read_mostly = {
|
||||
{
|
||||
.hook = ebt_nat_out,
|
||||
.owner = THIS_MODULE,
|
||||
.pf = PF_BRIDGE,
|
||||
.pf = NFPROTO_BRIDGE,
|
||||
.hooknum = NF_BR_LOCAL_OUT,
|
||||
.priority = NF_BR_PRI_NAT_DST_OTHER,
|
||||
},
|
||||
{
|
||||
.hook = ebt_nat_out,
|
||||
.owner = THIS_MODULE,
|
||||
.pf = PF_BRIDGE,
|
||||
.pf = NFPROTO_BRIDGE,
|
||||
.hooknum = NF_BR_POST_ROUTING,
|
||||
.priority = NF_BR_PRI_NAT_SRC,
|
||||
},
|
||||
{
|
||||
.hook = ebt_nat_in,
|
||||
.owner = THIS_MODULE,
|
||||
.pf = PF_BRIDGE,
|
||||
.pf = NFPROTO_BRIDGE,
|
||||
.hooknum = NF_BR_PRE_ROUTING,
|
||||
.priority = NF_BR_PRI_NAT_DST_BRIDGED,
|
||||
},
|
||||
|
@@ -1103,23 +1103,24 @@ free_newinfo:
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct ebt_table *ebt_register_table(struct net *net, struct ebt_table *table)
|
||||
struct ebt_table *
|
||||
ebt_register_table(struct net *net, const struct ebt_table *input_table)
|
||||
{
|
||||
struct ebt_table_info *newinfo;
|
||||
struct ebt_table *t;
|
||||
struct ebt_table *t, *table;
|
||||
struct ebt_replace_kernel *repl;
|
||||
int ret, i, countersize;
|
||||
void *p;
|
||||
|
||||
if (!table || !(repl = table->table) || !repl->entries ||
|
||||
repl->entries_size == 0 ||
|
||||
repl->counters || table->private) {
|
||||
if (input_table == NULL || (repl = input_table->table) == NULL ||
|
||||
repl->entries == 0 || repl->entries_size == 0 ||
|
||||
repl->counters != NULL || input_table->private != NULL) {
|
||||
BUGPRINT("Bad table data for ebt_register_table!!!\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
/* Don't add one table to multiple lists. */
|
||||
table = kmemdup(table, sizeof(struct ebt_table), GFP_KERNEL);
|
||||
table = kmemdup(input_table, sizeof(struct ebt_table), GFP_KERNEL);
|
||||
if (!table) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user