Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
This commit is contained in:
@@ -387,9 +387,7 @@ ip6t_do_table(struct sk_buff *skb,
|
||||
goto no_match;
|
||||
}
|
||||
|
||||
ADD_COUNTER(e->counters,
|
||||
ntohs(ipv6_hdr(skb)->payload_len) +
|
||||
sizeof(struct ipv6hdr), 1);
|
||||
ADD_COUNTER(e->counters, skb->len, 1);
|
||||
|
||||
t = ip6t_get_target_c(e);
|
||||
IP_NF_ASSERT(t->u.kernel.target);
|
||||
@@ -899,7 +897,7 @@ get_counters(const struct xt_table_info *t,
|
||||
struct ip6t_entry *iter;
|
||||
unsigned int cpu;
|
||||
unsigned int i;
|
||||
unsigned int curcpu;
|
||||
unsigned int curcpu = get_cpu();
|
||||
|
||||
/* Instead of clearing (by a previous call to memset())
|
||||
* the counters and using adds, we set the counters
|
||||
@@ -909,14 +907,16 @@ get_counters(const struct xt_table_info *t,
|
||||
* if new softirq were to run and call ipt_do_table
|
||||
*/
|
||||
local_bh_disable();
|
||||
curcpu = smp_processor_id();
|
||||
|
||||
i = 0;
|
||||
xt_entry_foreach(iter, t->entries[curcpu], t->size) {
|
||||
SET_COUNTER(counters[i], iter->counters.bcnt,
|
||||
iter->counters.pcnt);
|
||||
++i;
|
||||
}
|
||||
local_bh_enable();
|
||||
/* Processing counters from other cpus, we can let bottom half enabled,
|
||||
* (preemption is disabled)
|
||||
*/
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
if (cpu == curcpu)
|
||||
@@ -930,7 +930,7 @@ get_counters(const struct xt_table_info *t,
|
||||
}
|
||||
xt_info_wrunlock(cpu);
|
||||
}
|
||||
local_bh_enable();
|
||||
put_cpu();
|
||||
}
|
||||
|
||||
static struct xt_counters *alloc_counters(const struct xt_table *table)
|
||||
|
@@ -269,6 +269,11 @@ static int nf_ct_frag6_queue(struct nf_ct_frag6_queue *fq, struct sk_buff *skb,
|
||||
* in the chain of fragments so far. We must know where to put
|
||||
* this fragment, right?
|
||||
*/
|
||||
prev = fq->q.fragments_tail;
|
||||
if (!prev || NFCT_FRAG6_CB(prev)->offset < offset) {
|
||||
next = NULL;
|
||||
goto found;
|
||||
}
|
||||
prev = NULL;
|
||||
for (next = fq->q.fragments; next != NULL; next = next->next) {
|
||||
if (NFCT_FRAG6_CB(next)->offset >= offset)
|
||||
@@ -276,6 +281,7 @@ static int nf_ct_frag6_queue(struct nf_ct_frag6_queue *fq, struct sk_buff *skb,
|
||||
prev = next;
|
||||
}
|
||||
|
||||
found:
|
||||
/* We found where to put this one. Check for overlap with
|
||||
* preceding fragment, and, if needed, align things so that
|
||||
* any overlaps are eliminated.
|
||||
@@ -341,6 +347,8 @@ static int nf_ct_frag6_queue(struct nf_ct_frag6_queue *fq, struct sk_buff *skb,
|
||||
|
||||
/* Insert this fragment in the chain of fragments. */
|
||||
skb->next = next;
|
||||
if (!next)
|
||||
fq->q.fragments_tail = skb;
|
||||
if (prev)
|
||||
prev->next = skb;
|
||||
else
|
||||
@@ -464,6 +472,7 @@ nf_ct_frag6_reasm(struct nf_ct_frag6_queue *fq, struct net_device *dev)
|
||||
head->csum);
|
||||
|
||||
fq->q.fragments = NULL;
|
||||
fq->q.fragments_tail = NULL;
|
||||
|
||||
/* all original skbs are linked into the NFCT_FRAG6_CB(head).orig */
|
||||
fp = skb_shinfo(head)->frag_list;
|
||||
|
Reference in New Issue
Block a user