From: David S. Miller Date: Sat, 5 Mar 2011 05:35:25 +0000 (-0800) Subject: ipv4: Set rt->rt_iif more sanely on output routes. X-Git-Tag: v2.6.39-rc1~468^2~153 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=1018b5c01636c7c6bda31a719bda34fc631db29a;p=~emulex%2Finfiniband.git ipv4: Set rt->rt_iif more sanely on output routes. 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 --- diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 9794a2c6023..602473c9201 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;