* [PATCH] ipv4: Set rt->rt_iif more sanely on output routes.
@ 2011-03-05 5:36 David Miller
2011-03-05 6:52 ` Eric Dumazet
0 siblings, 1 reply; 2+ messages in thread
From: David Miller @ 2011-03-05 5:36 UTC (permalink / raw)
To: netdev
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;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ipv4: Set rt->rt_iif more sanely on output routes.
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
0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2011-03-05 6:52 UTC (permalink / raw)
To: David Miller; +Cc: netdev
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-05 6:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox