mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
ipv4: return valid RTA_IIF on ip route get
[ Upstream commit91146153da] Extend commit13378cad02("ipv4: Change rt->rt_iif encoding.") from 3.6 to return valid RTA_IIF on 'ip route get ... iif DEVICE' instead of rt_iif 0 which is displayed as 'iif *'. inet_iif is not appropriate to use because skb_iif is not set. Use the skb->dev->ifindex instead. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8dbc8dc8e8
commit
da1bba1f78
@@ -2306,7 +2306,7 @@ static int rt_fill_info(struct net *net, __be32 dst, __be32 src,
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
if (nla_put_u32(skb, RTA_IIF, rt->rt_iif))
|
||||
if (nla_put_u32(skb, RTA_IIF, skb->dev->ifindex))
|
||||
goto nla_put_failure;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user