Skip to content

Commit d3fe914

Browse files
Julian AnastasovJiri Slaby
Julian Anastasov
authored and
Jiri Slaby
committed
ipv4: return valid RTA_IIF on ip route get
[ Upstream commit 9114615 ] Extend commit 13378ca ("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 <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Jiri Slaby <[email protected]>
1 parent 8e41d3a commit d3fe914

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
@@ -2358,7 +2358,7 @@ static int rt_fill_info(struct net *net, __be32 dst, __be32 src,
23582358
}
23592359
} else
23602360
#endif
2361-
if (nla_put_u32(skb, RTA_IIF, rt->rt_iif))
2361+
if (nla_put_u32(skb, RTA_IIF, skb->dev->ifindex))
23622362
goto nla_put_failure;
23632363
}
23642364

0 commit comments

Comments
 (0)