diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2014-03-31 16:23:51 +0900 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-03-11 15:57:06 +0100 |
commit | e11d303b31ecdbd900e95d7bc4a8ad0bd7fe67bf (patch) | |
tree | 82e0b65d6e9e418a8a0781b920674b9e784ca709 /net/ipv6/inet6_connection_sock.c | |
parent | a9b7aa107807bd5c2d7dd15ee4abada284f5de4d (diff) | |
download | kernel_samsung_espresso10-e11d303b31ecdbd900e95d7bc4a8ad0bd7fe67bf.zip kernel_samsung_espresso10-e11d303b31ecdbd900e95d7bc4a8ad0bd7fe67bf.tar.gz kernel_samsung_espresso10-e11d303b31ecdbd900e95d7bc4a8ad0bd7fe67bf.tar.bz2 |
net: core: Support UID-based routing.
This contains the following commits:
1. 0149763 net: core: Add a UID range to fib rules.
2. 1650474 net: core: Use the socket UID in routing lookups.
3. 0b16771 net: ipv4: Add the UID to the route cache.
4. ee058f1 net: core: Add a RTA_UID attribute to routes.
This is so that userspace can do per-UID route lookups.
Bug: 15413527
Change-Id: I1285474c6734614d3bda6f61d88dfe89a4af7892
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Diffstat (limited to 'net/ipv6/inet6_connection_sock.c')
-rw-r--r-- | net/ipv6/inet6_connection_sock.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index aea323c..7ecbcc0 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c @@ -72,6 +72,7 @@ struct dst_entry *inet6_csk_route_req(struct sock *sk, fl6.flowi6_mark = sk->sk_mark; fl6.fl6_dport = inet_rsk(req)->rmt_port; fl6.fl6_sport = inet_rsk(req)->loc_port; + fl6.flowi6_uid = sock_i_uid(sk); security_req_classify_flow(req, flowi6_to_flowi(&fl6)); dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false); @@ -222,6 +223,7 @@ int inet6_csk_xmit(struct sk_buff *skb, struct flowi *fl_unused) fl6.flowi6_mark = sk->sk_mark; fl6.fl6_sport = inet->inet_sport; fl6.fl6_dport = inet->inet_dport; + fl6.flowi6_uid = sock_i_uid(sk); security_sk_classify_flow(sk, flowi6_to_flowi(&fl6)); final_p = fl6_update_dst(&fl6, np->opt, &final); |