diff options
author | David Ahern <dsahern@gmail.com> | 2017-05-03 23:21:10 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-05-12 08:35:57 (GMT) |
commit | ef4a2bdfe2d4059a0be910b5491ffddf2cde8952 (patch) | |
tree | aaed831bbed155ac4b437c6880ad43d50128bac6 /include | |
parent | 17b95e25e37c11cd9d1c450a0b09cb6df958cdef (diff) | |
download | libnl-ef4a2bdfe2d4059a0be910b5491ffddf2cde8952.zip libnl-ef4a2bdfe2d4059a0be910b5491ffddf2cde8952.tar.gz libnl-ef4a2bdfe2d4059a0be910b5491ffddf2cde8952.tar.bz2 |
rule: Add support for l3mdev in FIB rules
Add support for the l3mdev option in FIB rules. If l3mdev is set
then the lookup is directed to the table associated with the l3mdev
(e.g., VRF) device.
If the l3mev attribute is set the table id is not, so update the table
id attribute to make sure r_table is non-0.
iproute2 shows the rule as:
1000: from all lookup [l3mdev-table]
where [l3mdev-table] infers the dynamic nature of the table id. Keep
that notation for libnl.
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink-private/types.h | 2 | ||||
-rw-r--r-- | include/netlink/route/rule.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/netlink-private/types.h b/include/netlink-private/types.h index 36fd3a5..b6c5cea 100644 --- a/include/netlink-private/types.h +++ b/include/netlink-private/types.h @@ -346,7 +346,7 @@ struct rtnl_rule uint8_t r_family; uint8_t r_action; uint8_t r_dsfield; /* ipv4 only */ - uint8_t r_unused; + uint8_t r_l3mdev; uint32_t r_table; uint32_t r_flags; uint32_t r_prio; diff --git a/include/netlink/route/rule.h b/include/netlink/route/rule.h index 760b782..ec24269 100644 --- a/include/netlink/route/rule.h +++ b/include/netlink/route/rule.h @@ -67,6 +67,8 @@ extern void rtnl_rule_set_realms(struct rtnl_rule *, uint32_t); extern uint32_t rtnl_rule_get_realms(struct rtnl_rule *); extern void rtnl_rule_set_goto(struct rtnl_rule *, uint32_t); extern uint32_t rtnl_rule_get_goto(struct rtnl_rule *); +extern void rtnl_rule_set_l3mdev(struct rtnl_rule *); +extern uint8_t rtnl_rule_get_l3mdev(struct rtnl_rule *); #ifdef __cplusplus } |