diff options
Diffstat (limited to 'net/ipv4/ip_input.c')
-rw-r--r-- | net/ipv4/ip_input.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index c8c455dd9caf..97069399d864 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -329,6 +329,7 @@ drop: | |||
329 | static inline int ip_rcv_finish(struct sk_buff *skb) | 329 | static inline int ip_rcv_finish(struct sk_buff *skb) |
330 | { | 330 | { |
331 | const struct iphdr *iph = ip_hdr(skb); | 331 | const struct iphdr *iph = ip_hdr(skb); |
332 | struct rtable *rt; | ||
332 | 333 | ||
333 | /* | 334 | /* |
334 | * Initialise the virtual path cache for the packet. It describes | 335 | * Initialise the virtual path cache for the packet. It describes |
@@ -360,6 +361,12 @@ static inline int ip_rcv_finish(struct sk_buff *skb) | |||
360 | if (iph->ihl > 5 && ip_rcv_options(skb)) | 361 | if (iph->ihl > 5 && ip_rcv_options(skb)) |
361 | goto drop; | 362 | goto drop; |
362 | 363 | ||
364 | rt = (struct rtable*)skb->dst; | ||
365 | if (rt->rt_type == RTN_MULTICAST) | ||
366 | IP_INC_STATS_BH(IPSTATS_MIB_INMCASTPKTS); | ||
367 | else if (rt->rt_type == RTN_BROADCAST) | ||
368 | IP_INC_STATS_BH(IPSTATS_MIB_INBCASTPKTS); | ||
369 | |||
363 | return dst_input(skb); | 370 | return dst_input(skb); |
364 | 371 | ||
365 | drop: | 372 | drop: |