mirror_frr/lib
Lakshman Krishnamoorthy b68885f9b7 lib: Introducing a 3rd state for route-map match cmd: RMAP_NOOP
Introducing a 3rd state for route_map_apply library function: RMAP_NOOP

Traditionally route map MATCH rule apis  were designed to return
a binary response, consisting of either RMAP_MATCH or RMAP_NOMATCH.
(Route-map SET rule apis return RMAP_OKAY or RMAP_ERROR).
Depending on this response, the following statemachine decided the
course of action:

State1:
If match cmd returns RMAP_MATCH then, keep existing behaviour.
If routemap type is PERMIT, execute set cmds or call cmds if applicable,
otherwise PERMIT!
Else If routemap type is DENY, we DENYMATCH right away

State2:
If match cmd returns RMAP_NOMATCH, continue on to next route-map. If there
are no other rules or if all the rules return RMAP_NOMATCH, return DENYMATCH

We require a 3rd state because of the following situation:

The issue - what if, the rule api needs to abort or ignore a rule?:
"match evpn vni xx" route-map filter can be applied to incoming routes
regardless of whether the tunnel type is vxlan or mpls.
This rule should be N/A for mpls based evpn route, but applicable to only
vxlan based evpn route.
Also, this rule should be applicable for routes with VNI label only, and
not for routes without labels. For example, type 3 and type 4 EVPN routes
do not have labels, so, this match cmd should let them through.

Today, the filter produces either a match or nomatch response regardless of
whether it is mpls/vxlan, resulting in either permitting or denying the
route.. So an mpls evpn route may get filtered out incorrectly.
Eg: "route-map RM1 permit 10 ; match evpn vni 20" or
"route-map RM2 deny 20 ; match vni 20"

With the introduction of the 3rd state, we can abort this rule check safely.
How? The rules api can now return RMAP_NOOP to indicate
that it encountered an invalid check, and needs to abort just that rule,
but continue with other rules.

As a result we have a 3rd state:
State3:
If match cmd returned RMAP_NOOP
Then, proceed to other route-map, otherwise if there are no more
rules or if all the rules return RMAP_NOOP, then, return RMAP_PERMITMATCH.

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
2019-07-22 08:08:13 -07:00
..
printf lib: Include proper header 2019-06-07 09:29:45 -04:00
.gitignore
agentx.c
agg_table.c
agg_table.h
atomlist.c
atomlist.h lib: add missing atomlist_init/fini 2019-05-21 05:42:13 +02:00
bfd.c bfdd, lib, bgpd: add bfd cbit usage 2019-05-14 16:49:49 +02:00
bfd.h bgpd: add vty command to enable bfd control-plane-check-failure 2019-05-14 16:49:49 +02:00
bitfield.h
buffer.c
buffer.h
checksum.c lib: add internet checksum with pseudoheaders 2019-05-17 00:27:08 +00:00
checksum.h lib: add internet checksum with pseudoheaders 2019-05-17 00:27:08 +00:00
clippy.c lib/clippy: error out on unsupported bits 2019-06-12 19:22:59 +02:00
clippy.h
command_graph.c
command_graph.h
command_lex.l
command_match.c lib, zebra: remove uses of strncpy 2019-05-29 18:03:26 +00:00
command_match.h
command_parse.y lib: add a check for {[...]} in DEFUNs 2019-06-25 13:35:21 +02:00
command_py.c *: config.h or zebra.h is the first #include 2019-06-13 13:35:33 +02:00
command.c lib: split off c-ares code from nhrpd 2019-07-03 17:15:34 +02:00
command.h lib: split off c-ares code from nhrpd 2019-07-03 17:15:34 +02:00
compiler.h Merge pull request #4509 from opensourcerouting/spanish-intquisition 2019-06-13 14:00:50 -04:00
csv.c
csv.h
db.c
db.h
debug.c lib: Separate out the debug_init api 2019-05-28 17:16:16 -04:00
debug.h lib: Separate out the debug_init api 2019-05-28 17:16:16 -04:00
defun_lex.l lib/clippy: error out on unsupported bits 2019-06-12 19:22:59 +02:00
distribute.c lib: hashing functions should take const arguments 2019-05-14 21:23:08 +00:00
distribute.h
ferr.c lib: hashing functions should take const arguments 2019-05-14 21:23:08 +00:00
ferr.h
filter.c
filter.h
freebsd-queue.h
frr_pthread.c lib: use MTYPE_STATIC 2019-06-21 08:54:25 +02:00
frr_pthread.h lib: use MTYPE_STATIC 2019-06-21 08:54:25 +02:00
frr_zmq.c
frr_zmq.h
frratomic.h
frrlua.c *: config.h or zebra.h is the first #include 2019-06-13 13:35:33 +02:00
frrlua.h
frrstr.c lib: replace begins_with, add frrstr_endswith 2019-05-23 20:52:01 +00:00
frrstr.h lib: replace begins_with, add frrstr_endswith 2019-05-23 20:52:01 +00:00
getopt1.c
getopt.c
getopt.h
gitversion.pl
grammar_sandbox_main.c lib: Add '--command-log-always` to all daemons startup 2019-05-31 10:06:42 -04:00
grammar_sandbox.c
graph.c
graph.h
hash.c lib: use MTYPE_STATIC 2019-06-21 08:54:25 +02:00
hash.h lib: use MTYPE_STATIC 2019-06-21 08:54:25 +02:00
hook.c
hook.h
iana_afi.h lib, bgpd: Create iana_afi.h for storing iana_afi/safi enums 2019-06-02 15:02:07 -04:00
id_alloc.c *: config.h or zebra.h is the first #include 2019-06-13 13:35:33 +02:00
id_alloc.h
if_rmap.c lib: hashing functions should take const arguments 2019-05-14 21:23:08 +00:00
if_rmap.h
if.c Revert "Ospf missing interface handling 2" 2019-06-23 19:46:39 -04:00
if.h Revert "Ospf missing interface handling 2" 2019-06-23 19:46:39 -04:00
imsg-buffer.c
imsg.c
imsg.h
ipaddr.h lib: use const in ipaddr2str 2019-07-17 16:59:41 -04:00
jhash.c
jhash.h
json.c lib: add more convenient boolean adder for json 2019-05-17 00:27:08 +00:00
json.h vrrpd, lib: style fixes 2019-05-17 00:27:08 +00:00
keychain.c
keychain.h
lib_errors.c lib: split off c-ares code from nhrpd 2019-07-03 17:15:34 +02:00
lib_errors.h lib: split off c-ares code from nhrpd 2019-07-03 17:15:34 +02:00
libfrr.c lib,vtysh: Add vtysh commands for log-filter 2019-06-19 17:20:24 -04:00
libfrr.h *: Convert over to all -N namespace to change DAEMON_VTY_DIR 2019-06-04 19:52:46 -04:00
libospf.h
linklist.c lib: const a couple linklist apis 2019-05-28 20:23:04 +00:00
linklist.h *: s/TRUE/true/, s/FALSE/false/ 2019-07-01 17:26:05 +00:00
log_int.h
log_vty.c lib: Remove extraneous spacing/output filter cmds 2019-06-19 17:20:24 -04:00
log_vty.h lib,vtysh: Add vtysh commands for log-filter 2019-06-19 17:20:24 -04:00
log.c Merge pull request #4635 from AnuradhaKaruppiah/evpn-pim-replay 2019-07-15 15:40:12 -05:00
log.h lib: Add log filter manipulation code 2019-06-19 17:20:24 -04:00
logicalrouter.c
logicalrouter.h
Makefile
md5.c
md5.h
memory_vty.c lib: add process pids to 'show modules' 2019-07-02 15:15:13 -04:00
memory_vty.h
memory.c
memory.h lib: fix MTYPE alias on clang 2019-06-21 14:51:50 +02:00
mlag.c
mlag.h
module.c
module.h lib/printf: rename & private __find_arguments 2019-06-03 16:44:32 +02:00
monotime.h lib,zebra: avoid use of ctime in monotime api 2019-07-10 10:16:59 -04:00
mpls.c
mpls.h lib, zebra: support label chunk requests for SRGB 2019-07-10 15:20:27 +02:00
netns_linux.c
netns_other.c
network.c
network.h
nexthop_group_private.h lib: Private api for nexthop_group manipulation 2019-06-25 22:58:48 -04:00
nexthop_group.c lib: Private api for nexthop_group manipulation 2019-06-25 22:58:48 -04:00
nexthop_group.h lib: Private api for nexthop_group manipulation 2019-06-25 22:58:48 -04:00
nexthop.c lib: Add a nexthop_dup() that allocates and copies 2019-06-25 22:58:47 -04:00
nexthop.h lib: Add a nexthop_dup() that allocates and copies 2019-06-25 22:58:47 -04:00
northbound_cli.c lib: fix northbound static analyzer warning 2019-06-22 10:10:56 -03:00
northbound_cli.h
northbound_confd.c
northbound_db.c
northbound_db.h
northbound_grpc.cpp
northbound_sysrepo.c
northbound.c Merge pull request #4088 from opensourcerouting/bump-libyang-requirement-vers 2019-07-09 17:59:17 +03:00
northbound.h lib: northbound cli support to end config nodes 2019-06-22 10:08:33 -03:00
ns.h
ntop.c lib: drop DSO_SELF on inet_ntop 2019-06-13 00:05:03 +02:00
openbsd-queue.h
openbsd-tree.c lib: Add const to openbsd-tree functions 2019-05-13 17:21:22 -07:00
openbsd-tree.h lib: Add const to openbsd-tree functions 2019-05-13 17:21:22 -07:00
pbr.h bgp, zebra, lib: add protocol support for iptables 2019-07-08 08:36:45 +02:00
pid_output.c
plist_int.h
plist.c lib: Keep proper count of prefix-list hit-count when used 2019-06-20 01:51:38 -04:00
plist.h
pqueue.c
pqueue.h
prefix.c lib: remove snprintf from prefix2str 2019-06-13 17:08:05 +00:00
prefix.h
printfrr.h lib/printf: add extension support 2019-06-03 16:45:01 +02:00
privs.c
privs.h
ptm_lib.c
ptm_lib.h
pw.h
qobj.c
qobj.h
queue.h
resolver.c lib/resolver: NULL out callback before call 2019-07-03 17:15:38 +02:00
resolver.h lib: split off c-ares code from nhrpd 2019-07-03 17:15:34 +02:00
ringbuf.c
ringbuf.h
route_types.pl
route_types.txt zebra: update zebra_rib for vrrp 2019-05-17 00:27:08 +00:00
routemap.c lib: Introducing a 3rd state for route-map match cmd: RMAP_NOOP 2019-07-22 08:08:13 -07:00
routemap.h lib: Introducing a 3rd state for route-map match cmd: RMAP_NOOP 2019-07-22 08:08:13 -07:00
sbuf.c lib: use snprintfrr() in "hidden" printfs 2019-06-12 19:35:43 +02:00
sbuf.h lib: make "%Ld" work for int64_t 2019-06-12 19:35:43 +02:00
seqlock.c
seqlock.h
sha256.c
sha256.h
sigevent.c lib: simplify SEGV handler 2019-06-03 18:57:31 +02:00
sigevent.h
skiplist.c
skiplist.h
smux.h
snmp.c
sockopt.c lib: On some platforms function did not return anything 2019-06-07 09:29:45 -04:00
sockopt.h
sockunion.c bgpd, lib: Remove SO_MARK 2019-05-24 08:35:35 -04:00
sockunion.h bgpd, lib: Remove SO_MARK 2019-05-24 08:35:35 -04:00
spf_backoff.c
spf_backoff.h
srcdest_table.c lib: add some printfrr specifiers 2019-06-03 18:57:31 +02:00
srcdest_table.h lib: add some printfrr specifiers 2019-06-03 18:57:31 +02:00
stream.c
stream.h
strlcat.c
strlcpy.c
subdir.am lib: split off c-ares code from nhrpd 2019-07-03 17:15:34 +02:00
systemd.c
systemd.h
table.c lib: use MTYPE_STATIC 2019-06-21 08:54:25 +02:00
table.h *: s/TRUE/true/, s/FALSE/false/ 2019-07-01 17:26:05 +00:00
termtable.c lib: use snprintfrr() in "hidden" printfs 2019-06-12 19:35:43 +02:00
termtable.h lib: make "%Ld" work for int64_t 2019-06-12 19:35:43 +02:00
thread.c lib: Add function name to show thread poll 2019-06-13 15:14:04 -04:00
thread.h
typerb.c *: config.h or zebra.h is the first #include 2019-06-13 13:35:33 +02:00
typerb.h lib: add missing extern "C" {} blocks to new headers 2019-05-21 15:56:18 -03:00
typesafe.c *: config.h or zebra.h is the first #include 2019-06-13 13:35:33 +02:00
typesafe.h *: rename new ForEach macros from the typesafe API 2019-05-21 15:59:08 -03:00
vector.c
vector.h
version.h.in
vlan.h
vrf_int.h
vrf.c Revert "Ospf missing interface handling 2" 2019-06-23 19:46:39 -04:00
vrf.h Revert "Ospf missing interface handling 2" 2019-06-23 19:46:39 -04:00
vty.c lib: Do not blindly set the _read and _write pointers to NULL 2019-06-19 19:04:53 -04:00
vty.h lib: make "%Ld" work for int64_t 2019-06-12 19:35:43 +02:00
vxlan.h
wheel.c lib: hashing functions should take const arguments 2019-05-14 21:23:08 +00:00
wheel.h lib: hashing functions should take const arguments 2019-05-14 21:23:08 +00:00
workqueue.c
workqueue.h
yang_translator.c lib: hashing functions should take const arguments 2019-05-14 21:23:08 +00:00
yang_translator.h
yang_wrappers.c
yang_wrappers.h
yang.c lib: use MTYPE_STATIC 2019-06-21 08:54:25 +02:00
yang.h lib: use MTYPE_STATIC 2019-06-21 08:54:25 +02:00
zassert.h
zclient.c lib, zebra: handle failure in get chunk 2019-07-10 15:20:27 +02:00
zclient.h Merge pull request #4635 from AnuradhaKaruppiah/evpn-pim-replay 2019-07-15 15:40:12 -05:00
zebra.h bgpd, lib: Add iana_afi2str and iana_safi2str for eye pleasing strings (#4439) 2019-06-13 22:06:49 +02:00