Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <davem@davemloft.net>

+1 -1
+1 -1
net/ipv4/route.c
··· 2381 2381 rth->fl.mark = oldflp->mark; 2382 2382 rth->rt_dst = fl->fl4_dst; 2383 2383 rth->rt_src = fl->fl4_src; 2384 - rth->rt_iif = oldflp->oif ? : dev_out->ifindex; 2384 + rth->rt_iif = 0; 2385 2385 /* get references to the devices that are to be hold by the routing 2386 2386 cache entry */ 2387 2387 rth->dst.dev = dev_out;