summaryrefslogtreecommitdiff
path: root/include/net/fib_rules.h
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2014-03-31 16:23:51 +0900
committerSimon Wilson <simonwilson@google.com>2014-09-04 17:41:23 -0700
commitdbd37aae078b14794161b5e37a700d9847c7f95f (patch)
tree54933cfadb7ef633b7b6955d0486265fdf31163b /include/net/fib_rules.h
parent8440dace67872c28b11c1a438a0ec0501e2effcc (diff)
downloadolio-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/fib_rules.h')
-rw-r--r--include/net/fib_rules.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index e361f488242..4ac12e14c6d 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -23,6 +23,8 @@ struct fib_rule {
struct fib_rule __rcu *ctarget;
char iifname[IFNAMSIZ];
char oifname[IFNAMSIZ];
+ kuid_t uid_start;
+ kuid_t uid_end;
struct rcu_head rcu;
struct net * fr_net;
};
@@ -80,7 +82,9 @@ struct fib_rules_ops {
[FRA_FWMARK] = { .type = NLA_U32 }, \
[FRA_FWMASK] = { .type = NLA_U32 }, \
[FRA_TABLE] = { .type = NLA_U32 }, \
- [FRA_GOTO] = { .type = NLA_U32 }
+ [FRA_GOTO] = { .type = NLA_U32 }, \
+ [FRA_UID_START] = { .type = NLA_U32 }, \
+ [FRA_UID_END] = { .type = NLA_U32 }
static inline void fib_rule_get(struct fib_rule *rule)
{