diff options
| author | Lorenzo Colitti <lorenzo@google.com> | 2014-03-31 16:23:51 +0900 | 
|---|---|---|
| committer | Simon Wilson <simonwilson@google.com> | 2014-09-04 17:41:23 -0700 | 
| commit | dbd37aae078b14794161b5e37a700d9847c7f95f (patch) | |
| tree | 54933cfadb7ef633b7b6955d0486265fdf31163b /include/net/route.h | |
| parent | 8440dace67872c28b11c1a438a0ec0501e2effcc (diff) | |
| download | olio-linux-3.10-dbd37aae078b14794161b5e37a700d9847c7f95f.tar.xz olio-linux-3.10-dbd37aae078b14794161b5e37a700d9847c7f95f.zip  | |
net: core: Support UID-based routing.
This contains the following commits:
1. cc2f522 net: core: Add a UID range to fib rules.
2. d7ed2bd net: core: Use the socket UID in routing lookups.
3. 2f9306a net: core: Add a RTA_UID attribute to routes.
    This is so that userspace can do per-UID route lookups.
4. 8e46efb net: ipv6: Use the UID in IPv6 PMTUD
    IPv4 PMTUD already does this because ipv4_sk_update_pmtu
    uses __build_flow_key, which includes the UID.
Bug: 15413527
Change-Id: I81bd31dae655de9cce7d7a1f9a905dc1c2feba7c
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Diffstat (limited to 'include/net/route.h')
| -rw-r--r-- | include/net/route.h | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/route.h b/include/net/route.h index 2ea40c1b5e0..b5b44875543 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -142,7 +142,7 @@ static inline struct rtable *ip_route_output_ports(struct net *net, struct flowi  	flowi4_init_output(fl4, oif, sk ? sk->sk_mark : 0, tos,  			   RT_SCOPE_UNIVERSE, proto,  			   sk ? inet_sk_flowi_flags(sk) : 0, -			   daddr, saddr, dport, sport); +			   daddr, saddr, dport, sport, sock_i_uid(sk));  	if (sk)  		security_sk_classify_flow(sk, flowi4_to_flowi(fl4));  	return ip_route_output_flow(net, fl4, sk); @@ -253,7 +253,8 @@ static inline void ip_route_connect_init(struct flowi4 *fl4, __be32 dst, __be32  		flow_flags |= FLOWI_FLAG_CAN_SLEEP;  	flowi4_init_output(fl4, oif, sk->sk_mark, tos, RT_SCOPE_UNIVERSE, -			   protocol, flow_flags, dst, src, dport, sport); +			   protocol, flow_flags, dst, src, dport, sport, +			   sock_i_uid(sk));  }  static inline struct rtable *ip_route_connect(struct flowi4 *fl4,  |