Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] ipv4: Set rt->rt_iif more sanely on output routes.
Date: Sat, 05 Mar 2011 07:52:21 +0100	[thread overview]
Message-ID: <1299307941.2758.69.camel@edumazet-laptop> (raw)
In-Reply-To: <20110304.213625.104050222.davem@davemloft.net>

Le vendredi 04 mars 2011 à 21:36 -0800, David Miller a écrit :
> rt->rt_iif is only ever inspected on input routes, for example DCCP
> uses this to populate a route lookup flow key when generating replies
> to another packet.
> 
> Therefore, setting it to anything other than zero on output routes
> makes no sense.
> 
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
>  net/ipv4/route.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> index 9794a2c..602473c 100644
> --- a/net/ipv4/route.c
> +++ b/net/ipv4/route.c
> @@ -2381,7 +2381,7 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
>  	rth->fl.mark    = oldflp->mark;
>  	rth->rt_dst	= fl->fl4_dst;
>  	rth->rt_src	= fl->fl4_src;
> -	rth->rt_iif	= oldflp->oif ? : dev_out->ifindex;
> +	rth->rt_iif	= 0;
>  	/* get references to the devices that are to be hold by the routing
>  	   cache entry */
>  	rth->dst.dev	= dev_out;

Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>



      reply	other threads:[~2011-03-05  6:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-05  5:36 [PATCH] ipv4: Set rt->rt_iif more sanely on output routes David Miller
2011-03-05  6:52 ` Eric Dumazet [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1299307941.2758.69.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox