diff options
-rw-r--r-- | net/ipv4/proc.c | 21 | ||||
-rw-r--r-- | net/ipv6/ip6_input.c | 2 | ||||
-rw-r--r-- | net/sched/sch_prio.c | 2 | ||||
-rw-r--r-- | net/xfrm/xfrm_hash.c | 3 | ||||
-rw-r--r-- | net/xfrm/xfrm_policy.c | 4 |
5 files changed, 29 insertions, 3 deletions
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index 37ab5802ca08..cdbc6c135849 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c | |||
@@ -109,6 +109,17 @@ static const struct snmp_mib snmp4_ipstats_list[] = { | |||
109 | SNMP_MIB_SENTINEL | 109 | SNMP_MIB_SENTINEL |
110 | }; | 110 | }; |
111 | 111 | ||
112 | /* Following RFC4293 items are displayed in /proc/net/netstat */ | ||
113 | static const struct snmp_mib snmp4_ipextstats_list[] = { | ||
114 | SNMP_MIB_ITEM("InNoRoutes", IPSTATS_MIB_INNOROUTES), | ||
115 | SNMP_MIB_ITEM("InTruncatedPkts", IPSTATS_MIB_INTRUNCATEDPKTS), | ||
116 | SNMP_MIB_ITEM("InMcastPkts", IPSTATS_MIB_INMCASTPKTS), | ||
117 | SNMP_MIB_ITEM("OutMcastPkts", IPSTATS_MIB_OUTMCASTPKTS), | ||
118 | SNMP_MIB_ITEM("InBcastPkts", IPSTATS_MIB_INBCASTPKTS), | ||
119 | SNMP_MIB_ITEM("OutBcastPkts", IPSTATS_MIB_OUTBCASTPKTS), | ||
120 | SNMP_MIB_SENTINEL | ||
121 | }; | ||
122 | |||
112 | static const struct snmp_mib snmp4_icmp_list[] = { | 123 | static const struct snmp_mib snmp4_icmp_list[] = { |
113 | SNMP_MIB_ITEM("InMsgs", ICMP_MIB_INMSGS), | 124 | SNMP_MIB_ITEM("InMsgs", ICMP_MIB_INMSGS), |
114 | SNMP_MIB_ITEM("InErrors", ICMP_MIB_INERRORS), | 125 | SNMP_MIB_ITEM("InErrors", ICMP_MIB_INERRORS), |
@@ -338,6 +349,16 @@ static int netstat_seq_show(struct seq_file *seq, void *v) | |||
338 | snmp_fold_field((void **)net_statistics, | 349 | snmp_fold_field((void **)net_statistics, |
339 | snmp4_net_list[i].entry)); | 350 | snmp4_net_list[i].entry)); |
340 | 351 | ||
352 | seq_puts(seq, "\nIpExt:"); | ||
353 | for (i = 0; snmp4_ipextstats_list[i].name != NULL; i++) | ||
354 | seq_printf(seq, " %s", snmp4_ipextstats_list[i].name); | ||
355 | |||
356 | seq_puts(seq, "\nIpExt:"); | ||
357 | for (i = 0; snmp4_ipextstats_list[i].name != NULL; i++) | ||
358 | seq_printf(seq, " %lu", | ||
359 | snmp_fold_field((void **)ip_statistics, | ||
360 | snmp4_ipextstats_list[i].entry)); | ||
361 | |||
341 | seq_putc(seq, '\n'); | 362 | seq_putc(seq, '\n'); |
342 | return 0; | 363 | return 0; |
343 | } | 364 | } |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index be0ee8a34f9b..30a5cb1b203e 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -235,7 +235,7 @@ int ip6_mc_input(struct sk_buff *skb) | |||
235 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS); | 235 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS); |
236 | 236 | ||
237 | hdr = ipv6_hdr(skb); | 237 | hdr = ipv6_hdr(skb); |
238 | deliver = likely(!(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI))) || | 238 | deliver = unlikely(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI)) || |
239 | ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL); | 239 | ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL); |
240 | 240 | ||
241 | /* | 241 | /* |
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index 269a6e17c6c4..6d7542c26e47 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c | |||
@@ -75,7 +75,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr) | |||
75 | band = res.classid; | 75 | band = res.classid; |
76 | } | 76 | } |
77 | band = TC_H_MIN(band) - 1; | 77 | band = TC_H_MIN(band) - 1; |
78 | if (band > q->bands) | 78 | if (band >= q->bands) |
79 | return q->queues[q->prio2band[0]]; | 79 | return q->queues[q->prio2band[0]]; |
80 | 80 | ||
81 | return q->queues[band]; | 81 | return q->queues[band]; |
diff --git a/net/xfrm/xfrm_hash.c b/net/xfrm/xfrm_hash.c index 37643bb8768a..55ab5792af56 100644 --- a/net/xfrm/xfrm_hash.c +++ b/net/xfrm/xfrm_hash.c | |||
@@ -22,7 +22,8 @@ struct hlist_head *xfrm_hash_alloc(unsigned int sz) | |||
22 | n = __vmalloc(sz, GFP_KERNEL, PAGE_KERNEL); | 22 | n = __vmalloc(sz, GFP_KERNEL, PAGE_KERNEL); |
23 | else | 23 | else |
24 | n = (struct hlist_head *) | 24 | n = (struct hlist_head *) |
25 | __get_free_pages(GFP_KERNEL, get_order(sz)); | 25 | __get_free_pages(GFP_KERNEL | __GFP_NOWARN, |
26 | get_order(sz)); | ||
26 | 27 | ||
27 | if (n) | 28 | if (n) |
28 | memset(n, 0, sz); | 29 | memset(n, 0, sz); |
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 95271e8426a1..d0882e53b6fc 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -796,6 +796,10 @@ struct xfrm_policy *xfrm_policy_byid(u8 type, int dir, u32 id, int delete, | |||
796 | struct hlist_head *chain; | 796 | struct hlist_head *chain; |
797 | struct hlist_node *entry; | 797 | struct hlist_node *entry; |
798 | 798 | ||
799 | *err = -ENOENT; | ||
800 | if (xfrm_policy_id2dir(id) != dir) | ||
801 | return NULL; | ||
802 | |||
799 | *err = 0; | 803 | *err = 0; |
800 | write_lock_bh(&xfrm_policy_lock); | 804 | write_lock_bh(&xfrm_policy_lock); |
801 | chain = xfrm_policy_byidx + idx_hash(id); | 805 | chain = xfrm_policy_byidx + idx_hash(id); |