diff options
Diffstat (limited to 'net/ipv6/route.c')
| -rw-r--r-- | net/ipv6/route.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index a6c88dd1911..a408811528e 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -961,6 +961,8 @@ struct dst_entry * ip6_route_output(struct net *net, const struct sock *sk, { int flags = 0; + fl6->flowi6_iif = LOOPBACK_IFINDEX; + if ((sk && sk->sk_bound_dev_if) || rt6_need_strict(&fl6->daddr)) flags |= RT6_LOOKUP_F_IFACE; @@ -2648,9 +2650,10 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void oif = nla_get_u32(tb[RTA_OIF]); if (tb[RTA_UID]) - fl6.flowi6_uid = nla_get_u32(tb[RTA_UID]); + fl6.flowi6_uid = make_kuid(current_user_ns(), + nla_get_u32(tb[RTA_UID])); else - fl6.flowi6_uid = (iif ? (uid_t) -1 : current_uid()); + fl6.flowi6_uid = iif ? INVALID_UID : current_uid(); if (iif) { struct net_device *dev; |
