summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-02-20 08:55:58 -0500
committerDavid S. Miller <davem@davemloft.net>2018-02-21 17:49:24 -0500
commitcac56209a66ea3b0be67aa2966b2c628b944da1e (patch)
tree1f100b5a7ef31579afc6f9242c159cd6c131d780 /include
parentaf9090c2375e6a4a7b3059c9a3d36cb363c35d42 (diff)
net: Allow a rule to track originating protocol
Allow a rule that is being added/deleted/modified or dumped to contain the originating protocol's id. The protocol is handled just like a routes originating protocol is. This is especially useful because there is starting to be a plethora of different user space programs adding rules. Allow the vrf device to specify that the kernel is the originator of the rule created for this device. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/fib_rules.h3
-rw-r--r--include/uapi/linux/fib_rules.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index 648caf90ec07..b166ef07e6d4 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -26,7 +26,8 @@ struct fib_rule {
u32 table;
u8 action;
u8 l3mdev;
- /* 2 bytes hole, try to use */
+ u8 proto;
+ /* 1 byte hole, try to use */
u32 target;
__be64 tun_id;
struct fib_rule __rcu *ctarget;
diff --git a/include/uapi/linux/fib_rules.h b/include/uapi/linux/fib_rules.h
index 2b642bf9b5a0..925539172d5b 100644
--- a/include/uapi/linux/fib_rules.h
+++ b/include/uapi/linux/fib_rules.h
@@ -23,8 +23,8 @@ struct fib_rule_hdr {
__u8 tos;
__u8 table;
+ __u8 proto;
__u8 res1; /* reserved */
- __u8 res2; /* reserved */
__u8 action;
__u32 flags;