[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 22 Oct 2007 11:58:17 +0530
From: Krishna Kumar2 <krkumar2@...ibm.com>
To: Gui Jianfeng <guijianfeng@...fujitsu.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH 2.4.35.3] Fix the "InAddrErrors" increasing problem
Gui Jianfeng wrote on 10/22/2007 11:37:07 AM:
> @@ -310,8 +310,12 @@ static inline int ip_rcv_finish(struct s
> * how the packet travels inside Linux networking.
> */
> if (skb->dst == NULL) {
> - if (ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, dev))
> - goto drop;
> + int err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos,
dev);
> + if (unlikely(err)) {
> + if (err == -EHOSTUNREACH)
> + IP_INC_STATS_BH(IpInAddrErrors);
> + }
> + goto drop;
> }
Shouldn't the "goto drop" be inside the "if (unlikely(err)) {" case?
And normally it is nice to have a blank line after variable declaration.
- KK
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists