Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [IPV4] SNMP: Display new statistics at /proc/net/netstat [IPV6]: Reverse sense of promisc tests in ip6_mc_input [NET_SCHED]: prio qdisc boundary condition [IPSEC]: Don't warn if high-order hash resize fails [IPSEC]: Check validity of direction in xfrm_policy_byid
This commit is contained in:
commit
200cfbb36c
|
@ -109,6 +109,17 @@ static const struct snmp_mib snmp4_ipstats_list[] = {
|
|||
SNMP_MIB_SENTINEL
|
||||
};
|
||||
|
||||
/* Following RFC4293 items are displayed in /proc/net/netstat */
|
||||
static const struct snmp_mib snmp4_ipextstats_list[] = {
|
||||
SNMP_MIB_ITEM("InNoRoutes", IPSTATS_MIB_INNOROUTES),
|
||||
SNMP_MIB_ITEM("InTruncatedPkts", IPSTATS_MIB_INTRUNCATEDPKTS),
|
||||
SNMP_MIB_ITEM("InMcastPkts", IPSTATS_MIB_INMCASTPKTS),
|
||||
SNMP_MIB_ITEM("OutMcastPkts", IPSTATS_MIB_OUTMCASTPKTS),
|
||||
SNMP_MIB_ITEM("InBcastPkts", IPSTATS_MIB_INBCASTPKTS),
|
||||
SNMP_MIB_ITEM("OutBcastPkts", IPSTATS_MIB_OUTBCASTPKTS),
|
||||
SNMP_MIB_SENTINEL
|
||||
};
|
||||
|
||||
static const struct snmp_mib snmp4_icmp_list[] = {
|
||||
SNMP_MIB_ITEM("InMsgs", ICMP_MIB_INMSGS),
|
||||
SNMP_MIB_ITEM("InErrors", ICMP_MIB_INERRORS),
|
||||
|
@ -338,6 +349,16 @@ static int netstat_seq_show(struct seq_file *seq, void *v)
|
|||
snmp_fold_field((void **)net_statistics,
|
||||
snmp4_net_list[i].entry));
|
||||
|
||||
seq_puts(seq, "\nIpExt:");
|
||||
for (i = 0; snmp4_ipextstats_list[i].name != NULL; i++)
|
||||
seq_printf(seq, " %s", snmp4_ipextstats_list[i].name);
|
||||
|
||||
seq_puts(seq, "\nIpExt:");
|
||||
for (i = 0; snmp4_ipextstats_list[i].name != NULL; i++)
|
||||
seq_printf(seq, " %lu",
|
||||
snmp_fold_field((void **)ip_statistics,
|
||||
snmp4_ipextstats_list[i].entry));
|
||||
|
||||
seq_putc(seq, '\n');
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -235,7 +235,7 @@ int ip6_mc_input(struct sk_buff *skb)
|
|||
IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS);
|
||||
|
||||
hdr = ipv6_hdr(skb);
|
||||
deliver = likely(!(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI))) ||
|
||||
deliver = unlikely(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI)) ||
|
||||
ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);
|
||||
|
||||
/*
|
||||
|
|
|
@ -75,7 +75,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
|
|||
band = res.classid;
|
||||
}
|
||||
band = TC_H_MIN(band) - 1;
|
||||
if (band > q->bands)
|
||||
if (band >= q->bands)
|
||||
return q->queues[q->prio2band[0]];
|
||||
|
||||
return q->queues[band];
|
||||
|
|
|
@ -22,7 +22,8 @@ struct hlist_head *xfrm_hash_alloc(unsigned int sz)
|
|||
n = __vmalloc(sz, GFP_KERNEL, PAGE_KERNEL);
|
||||
else
|
||||
n = (struct hlist_head *)
|
||||
__get_free_pages(GFP_KERNEL, get_order(sz));
|
||||
__get_free_pages(GFP_KERNEL | __GFP_NOWARN,
|
||||
get_order(sz));
|
||||
|
||||
if (n)
|
||||
memset(n, 0, sz);
|
||||
|
|
|
@ -796,6 +796,10 @@ struct xfrm_policy *xfrm_policy_byid(u8 type, int dir, u32 id, int delete,
|
|||
struct hlist_head *chain;
|
||||
struct hlist_node *entry;
|
||||
|
||||
*err = -ENOENT;
|
||||
if (xfrm_policy_id2dir(id) != dir)
|
||||
return NULL;
|
||||
|
||||
*err = 0;
|
||||
write_lock_bh(&xfrm_policy_lock);
|
||||
chain = xfrm_policy_byidx + idx_hash(id);
|
||||
|
|
Loading…
Reference in New Issue