aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 947ed1ded026..fdb9c87137bd 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2797,6 +2797,7 @@ static const struct nla_policy rtm_ipv6_policy[RTA_MAX+1] = {
2797 [RTA_ENCAP_TYPE] = { .type = NLA_U16 }, 2797 [RTA_ENCAP_TYPE] = { .type = NLA_U16 },
2798 [RTA_ENCAP] = { .type = NLA_NESTED }, 2798 [RTA_ENCAP] = { .type = NLA_NESTED },
2799 [RTA_EXPIRES] = { .type = NLA_U32 }, 2799 [RTA_EXPIRES] = { .type = NLA_U32 },
2800 [RTA_UID] = { .type = NLA_U32 },
2800}; 2801};
2801 2802
2802static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh, 2803static int rtm_to_fib6_config(struct sk_buff *skb, struct nlmsghdr *nlh,
@@ -3371,6 +3372,12 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh)
3371 if (tb[RTA_MARK]) 3372 if (tb[RTA_MARK])
3372 fl6.flowi6_mark = nla_get_u32(tb[RTA_MARK]); 3373 fl6.flowi6_mark = nla_get_u32(tb[RTA_MARK]);
3373 3374
3375 if (tb[RTA_UID])
3376 fl6.flowi6_uid = make_kuid(current_user_ns(),
3377 nla_get_u32(tb[RTA_UID]));
3378 else
3379 fl6.flowi6_uid = iif ? INVALID_UID : current_uid();
3380
3374 if (iif) { 3381 if (iif) {
3375 struct net_device *dev; 3382 struct net_device *dev;
3376 int flags = 0; 3383 int flags = 0;