Skip to content
Commit 1b86a58f authored by OGAWA Hirofumi's avatar OGAWA Hirofumi Committed by David S. Miller
Browse files

ipv4: Fix "Set rt->rt_iif more sanely on output routes."

Commit 1018b5c0

 ("Set rt->rt_iif more
sanely on output routes.")  breaks rt_is_{output,input}_route.

This became the cause to return "IP_PKTINFO's ->ipi_ifindex == 0".

To fix it, this does:

1) Add "int rt_route_iif;" to struct rtable

2) For input routes, always set rt_route_iif to same value as rt_iif

3) For output routes, always set rt_route_iif to zero.  Set rt_iif
   as it is done currently.

4) Change rt_is_{output,input}_route() to test rt_route_iif

Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9b57e1a7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment