diff options
Diffstat (limited to 'net/ipv6/ip6_input.c')
-rw-r--r-- | net/ipv6/ip6_input.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 11bfc7c43182..61e7a6c8141d 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -108,8 +108,10 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt | |||
108 | 108 | ||
109 | /* pkt_len may be zero if Jumbo payload option is present */ | 109 | /* pkt_len may be zero if Jumbo payload option is present */ |
110 | if (pkt_len || hdr->nexthdr != NEXTHDR_HOP) { | 110 | if (pkt_len || hdr->nexthdr != NEXTHDR_HOP) { |
111 | if (pkt_len + sizeof(struct ipv6hdr) > skb->len) | 111 | if (pkt_len + sizeof(struct ipv6hdr) > skb->len) { |
112 | goto truncated; | 112 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INTRUNCATEDPKTS); |
113 | goto drop; | ||
114 | } | ||
113 | if (pskb_trim_rcsum(skb, pkt_len + sizeof(struct ipv6hdr))) { | 115 | if (pskb_trim_rcsum(skb, pkt_len + sizeof(struct ipv6hdr))) { |
114 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INHDRERRORS); | 116 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INHDRERRORS); |
115 | goto drop; | 117 | goto drop; |
@@ -128,8 +130,6 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt | |||
128 | rcu_read_unlock(); | 130 | rcu_read_unlock(); |
129 | 131 | ||
130 | return NF_HOOK(PF_INET6,NF_IP6_PRE_ROUTING, skb, dev, NULL, ip6_rcv_finish); | 132 | return NF_HOOK(PF_INET6,NF_IP6_PRE_ROUTING, skb, dev, NULL, ip6_rcv_finish); |
131 | truncated: | ||
132 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INTRUNCATEDPKTS); | ||
133 | err: | 133 | err: |
134 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INHDRERRORS); | 134 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INHDRERRORS); |
135 | drop: | 135 | drop: |