Subject: Re: [PATCH V2 net-next-2.6] net: relax dst refcnt in input path

From: Patrick McHardy <[email-masked]>
Date: Wed, 22 Jul 2009 14:40:06 +0200

Eric Dumazet wrote:
> diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
> index db46b4b..23e974b 100644
> --- a/net/ipv4/ip_input.c
> +++ b/net/ipv4/ip_input.c
> @@ -331,7 +331,7 @@ static int ip_rcv_finish(struct sk_buff *skb)
>  	 */
>  	if (skb_dst(skb) == NULL) {
>  		int err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos,
> -					 skb->dev);
> +					 skb->dev, 1);
>  		if (unlikely(err)) {
>  			if (err == -EHOSTUNREACH)
>  				IP_INC_STATS_BH(dev_net(skb->dev),

The packet might get queued by netfilter after this. I think this needs
another skb_dst_force() in __nf_queue().