diff options
Diffstat (limited to 'net/ipv4/ip_input.c')
-rw-r--r-- | net/ipv4/ip_input.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index 15e3e683adec..054a3e97d822 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -141,6 +141,7 @@ | |||
141 | #include <net/icmp.h> | 141 | #include <net/icmp.h> |
142 | #include <net/raw.h> | 142 | #include <net/raw.h> |
143 | #include <net/checksum.h> | 143 | #include <net/checksum.h> |
144 | #include <net/inet_ecn.h> | ||
144 | #include <linux/netfilter_ipv4.h> | 145 | #include <linux/netfilter_ipv4.h> |
145 | #include <net/xfrm.h> | 146 | #include <net/xfrm.h> |
146 | #include <linux/mroute.h> | 147 | #include <linux/mroute.h> |
@@ -410,6 +411,13 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, | |||
410 | if (iph->ihl < 5 || iph->version != 4) | 411 | if (iph->ihl < 5 || iph->version != 4) |
411 | goto inhdr_error; | 412 | goto inhdr_error; |
412 | 413 | ||
414 | BUILD_BUG_ON(IPSTATS_MIB_ECT1PKTS != IPSTATS_MIB_NOECTPKTS + INET_ECN_ECT_1); | ||
415 | BUILD_BUG_ON(IPSTATS_MIB_ECT0PKTS != IPSTATS_MIB_NOECTPKTS + INET_ECN_ECT_0); | ||
416 | BUILD_BUG_ON(IPSTATS_MIB_CEPKTS != IPSTATS_MIB_NOECTPKTS + INET_ECN_CE); | ||
417 | IP_ADD_STATS_BH(dev_net(dev), | ||
418 | IPSTATS_MIB_NOECTPKTS + (iph->tos & INET_ECN_MASK), | ||
419 | max_t(unsigned short, 1, skb_shinfo(skb)->gso_segs)); | ||
420 | |||
413 | if (!pskb_may_pull(skb, iph->ihl*4)) | 421 | if (!pskb_may_pull(skb, iph->ihl*4)) |
414 | goto inhdr_error; | 422 | goto inhdr_error; |
415 | 423 | ||