diff options
author | G. Paul Ziemba <paulz@labn.net> | 2023-07-31 04:14:01 +0200 |
---|---|---|
committer | G. Paul Ziemba <paulz@labn.net> | 2023-08-08 19:18:22 +0200 |
commit | c47fd378f33b721cc32b788c6ce89353b1076416 (patch) | |
tree | a86e2a1e56e59248781cd1ccd21fb816d5b6b8d3 /lib/pbr.h | |
parent | pbrd: PBR_FILTER_DSFIELD -> {PBR_FILTER_DSCP,PBR_FILTER_ECN} (diff) | |
download | frr-c47fd378f33b721cc32b788c6ce89353b1076416.tar.xz frr-c47fd378f33b721cc32b788c6ce89353b1076416.zip |
pbrd: add explicit 'family' field for rules
In the netlink-mediated kernel dataplane, each rule is stored
in either an IPv4-specific database or an IPv6-specific database.
PBRD opportunistically gleans each rule's address family value
from its source or destination IP address match value (if either
exists), or from its nexthop or nexthop-group (if it exists).
The 'family' value is particularly needed for netlink during
incremental rule deletion when none of the above fields remain set.
Before now, this address family has been encoded by occult means
in the (possibly otherwise unset) source/destination IP match
fields in ZAPI and zebra.
This commit documents the reasons for maintaining the 'family'
field in the PBRD rule structure, adds a 'family' field in the
common lib/pbr.h rule structure, and carries it explicitly in ZAPI.
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
Diffstat (limited to 'lib/pbr.h')
-rw-r--r-- | lib/pbr.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -114,6 +114,7 @@ struct pbr_action { */ struct pbr_rule { vrf_id_t vrf_id; + uint8_t family; /* netlink: select which rule database */ uint32_t seq; uint32_t priority; |