Skip to content

Commit 1018b5c

Browse files
committed
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 <[email protected]>
1 parent 4157434 commit 1018b5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/route.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2381,7 +2381,7 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
23812381
rth->fl.mark = oldflp->mark;
23822382
rth->rt_dst = fl->fl4_dst;
23832383
rth->rt_src = fl->fl4_src;
2384-
rth->rt_iif = oldflp->oif ? : dev_out->ifindex;
2384+
rth->rt_iif = 0;
23852385
/* get references to the devices that are to be hold by the routing
23862386
cache entry */
23872387
rth->dst.dev = dev_out;

0 commit comments

Comments
 (0)