diff options
-rw-r--r-- | include/net/ipv6.h | 3 | ||||
-rw-r--r-- | net/dccp/ipv6.c | 6 | ||||
-rw-r--r-- | net/ipv6/icmp.c | 4 | ||||
-rw-r--r-- | net/ipv6/ip6_output.c | 2 | ||||
-rw-r--r-- | net/ipv6/mcast.c | 2 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 3 | ||||
-rw-r--r-- | net/sctp/ipv6.c | 2 |
7 files changed, 13 insertions, 9 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 744fe7443cb9..5107cd92a467 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -141,7 +141,8 @@ DECLARE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics); | |||
141 | 141 | ||
142 | #define ICMP6_INC_STATS(net, idev, field) ({ (void)(net); \ | 142 | #define ICMP6_INC_STATS(net, idev, field) ({ (void)(net); \ |
143 | _DEVINC(icmpv6, , idev, field); }) | 143 | _DEVINC(icmpv6, , idev, field); }) |
144 | #define ICMP6_INC_STATS_BH(idev, field) _DEVINC(icmpv6, _BH, idev, field) | 144 | #define ICMP6_INC_STATS_BH(net, idev, field) ({ (void)(net); \ |
145 | _DEVINC(icmpv6, _BH, idev, field); }) | ||
145 | 146 | ||
146 | #define ICMP6MSGOUT_INC_STATS(idev, field) \ | 147 | #define ICMP6MSGOUT_INC_STATS(idev, field) \ |
147 | _DEVINC(icmpv6msg, , idev, field +256) | 148 | _DEVINC(icmpv6msg, , idev, field +256) |
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index caa7f3469626..11062780bb02 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -98,7 +98,8 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
98 | 98 | ||
99 | if (skb->len < offset + sizeof(*dh) || | 99 | if (skb->len < offset + sizeof(*dh) || |
100 | skb->len < offset + __dccp_basic_hdr_len(dh)) { | 100 | skb->len < offset + __dccp_basic_hdr_len(dh)) { |
101 | ICMP6_INC_STATS_BH(__in6_dev_get(skb->dev), ICMP6_MIB_INERRORS); | 101 | ICMP6_INC_STATS_BH(net, __in6_dev_get(skb->dev), |
102 | ICMP6_MIB_INERRORS); | ||
102 | return; | 103 | return; |
103 | } | 104 | } |
104 | 105 | ||
@@ -107,7 +108,8 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
107 | &hdr->saddr, dh->dccph_sport, inet6_iif(skb)); | 108 | &hdr->saddr, dh->dccph_sport, inet6_iif(skb)); |
108 | 109 | ||
109 | if (sk == NULL) { | 110 | if (sk == NULL) { |
110 | ICMP6_INC_STATS_BH(__in6_dev_get(skb->dev), ICMP6_MIB_INERRORS); | 111 | ICMP6_INC_STATS_BH(net, __in6_dev_get(skb->dev), |
112 | ICMP6_MIB_INERRORS); | ||
111 | return; | 113 | return; |
112 | } | 114 | } |
113 | 115 | ||
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 758cdd7dc27e..4c961556306a 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -664,7 +664,7 @@ static int icmpv6_rcv(struct sk_buff *skb) | |||
664 | skb_set_network_header(skb, nh); | 664 | skb_set_network_header(skb, nh); |
665 | } | 665 | } |
666 | 666 | ||
667 | ICMP6_INC_STATS_BH(idev, ICMP6_MIB_INMSGS); | 667 | ICMP6_INC_STATS_BH(dev_net(dev), idev, ICMP6_MIB_INMSGS); |
668 | 668 | ||
669 | saddr = &ipv6_hdr(skb)->saddr; | 669 | saddr = &ipv6_hdr(skb)->saddr; |
670 | daddr = &ipv6_hdr(skb)->daddr; | 670 | daddr = &ipv6_hdr(skb)->daddr; |
@@ -772,7 +772,7 @@ static int icmpv6_rcv(struct sk_buff *skb) | |||
772 | return 0; | 772 | return 0; |
773 | 773 | ||
774 | discard_it: | 774 | discard_it: |
775 | ICMP6_INC_STATS_BH(idev, ICMP6_MIB_INERRORS); | 775 | ICMP6_INC_STATS_BH(dev_net(dev), idev, ICMP6_MIB_INERRORS); |
776 | drop_no_count: | 776 | drop_no_count: |
777 | kfree_skb(skb); | 777 | kfree_skb(skb); |
778 | return 0; | 778 | return 0; |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index f0fded630f57..e7eff320619c 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -1483,7 +1483,7 @@ int ip6_push_pending_frames(struct sock *sk) | |||
1483 | struct inet6_dev *idev = ip6_dst_idev(skb->dst); | 1483 | struct inet6_dev *idev = ip6_dst_idev(skb->dst); |
1484 | 1484 | ||
1485 | ICMP6MSGOUT_INC_STATS_BH(idev, icmp6_hdr(skb)->icmp6_type); | 1485 | ICMP6MSGOUT_INC_STATS_BH(idev, icmp6_hdr(skb)->icmp6_type); |
1486 | ICMP6_INC_STATS_BH(idev, ICMP6_MIB_OUTMSGS); | 1486 | ICMP6_INC_STATS_BH(net, idev, ICMP6_MIB_OUTMSGS); |
1487 | } | 1487 | } |
1488 | 1488 | ||
1489 | err = ip6_local_out(skb); | 1489 | err = ip6_local_out(skb); |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index fa413afeb994..f06ceea1ffa0 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -1475,7 +1475,7 @@ static void mld_sendpack(struct sk_buff *skb) | |||
1475 | out: | 1475 | out: |
1476 | if (!err) { | 1476 | if (!err) { |
1477 | ICMP6MSGOUT_INC_STATS_BH(idev, ICMPV6_MLD2_REPORT); | 1477 | ICMP6MSGOUT_INC_STATS_BH(idev, ICMPV6_MLD2_REPORT); |
1478 | ICMP6_INC_STATS_BH(idev, ICMP6_MIB_OUTMSGS); | 1478 | ICMP6_INC_STATS_BH(net, idev, ICMP6_MIB_OUTMSGS); |
1479 | IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_OUTMCASTPKTS); | 1479 | IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_OUTMCASTPKTS); |
1480 | } else | 1480 | } else |
1481 | IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_OUTDISCARDS); | 1481 | IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_OUTDISCARDS); |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 6268d266c034..424d9c4a67ac 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -330,7 +330,8 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
330 | th->dest, &hdr->saddr, th->source, skb->dev->ifindex); | 330 | th->dest, &hdr->saddr, th->source, skb->dev->ifindex); |
331 | 331 | ||
332 | if (sk == NULL) { | 332 | if (sk == NULL) { |
333 | ICMP6_INC_STATS_BH(__in6_dev_get(skb->dev), ICMP6_MIB_INERRORS); | 333 | ICMP6_INC_STATS_BH(net, __in6_dev_get(skb->dev), |
334 | ICMP6_MIB_INERRORS); | ||
334 | return; | 335 | return; |
335 | } | 336 | } |
336 | 337 | ||
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index c78da3c9dd34..4124bbb99947 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -156,7 +156,7 @@ SCTP_STATIC void sctp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
156 | skb->network_header = saveip; | 156 | skb->network_header = saveip; |
157 | skb->transport_header = savesctp; | 157 | skb->transport_header = savesctp; |
158 | if (!sk) { | 158 | if (!sk) { |
159 | ICMP6_INC_STATS_BH(idev, ICMP6_MIB_INERRORS); | 159 | ICMP6_INC_STATS_BH(dev_net(skb->dev), idev, ICMP6_MIB_INERRORS); |
160 | goto out; | 160 | goto out; |
161 | } | 161 | } |
162 | 162 | ||