net: core: add UID to flows, rules, and routes

- Define a new FIB rule attributes, FRA_UID_RANGE, to describe a
  range of UIDs.
- Define a RTA_UID attribute for per-UID route lookups and dumps.
- Support passing these attributes to and from userspace via
  rtnetlink. The value INVALID_UID indicates no UID was
  specified.
- Add a UID field to the flow structures.

Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Lorenzo Colitti
2016-11-04 02:23:42 +09:00
committed by David S. Miller
parent 86741ec254
commit 622ec2c9d5
8 changed files with 111 additions and 3 deletions

View File

@@ -29,6 +29,11 @@ struct fib_rule_hdr {
__u32 flags;
};
struct fib_rule_uid_range {
__u32 start;
__u32 end;
};
enum {
FRA_UNSPEC,
FRA_DST, /* destination address */
@@ -51,6 +56,7 @@ enum {
FRA_OIFNAME,
FRA_PAD,
FRA_L3MDEV, /* iif or oif is l3mdev goto its table */
FRA_UID_RANGE, /* UID range */
__FRA_MAX
};