mirror_frr/lib
Anton Degtyarev 57592a53b5 bgpd, zebra: auto assign labels from label pool to regular prefixes in BGP labeled unicast
This commit is the last missing piece to complete BGP LU support in bgpd. To this moment, bgpd (and zebra) supported auto label assignment only for prefixes leaked from VRFs to vpn and for MPLS SR prefixes. This adds auto label assignment to other routes types in bgpd. The following enhancements have been made:
* bgp_route.c:bgp_process_main_one() now sets implicit-null local_label to all local, aggregate and redistributed routes.
* bgp_route.c:bgp_process_main_one() now will request a label from the label pool for any prefix that loses the label for some reason (for example, when the static label assignment config is removed)
* bgp_label.c:bgp_reg_dereg_for_label() now requests labels from label pool for routes which have no associated label index
* zebra_mpls.c:zebra_mpls_fec_register() now expects both label and label_index from the calling function, one of which must be set to MPLS_INVALID_LABEL or MPLS_INVALID_LABEL_INDEX, based on this it will decide how to register the provided FEC.

Signed-off-by: Anton Degtyarev <anton@cumulusnetworks.com>
2018-12-20 15:28:52 +03:00
..
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
agentx.c lib: remove agentx already enabled warning 2018-10-28 02:50:47 +00:00
agg_table.c bgpd, lib, zebra: Wrapper get/set of table->info pointer 2018-09-23 20:04:39 -04:00
agg_table.h bgpd isisd lib: fix return on void functions 2018-11-20 16:32:25 +01:00
bfd.c *: spelchek 2018-10-25 20:10:57 +02:00
bfd.h bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
bitfield.h *: reindent 2017-07-17 14:04:07 +02:00
buffer.c *: LIB_[ERR|WARN] -> EC_LIB 2018-09-13 19:34:28 +00:00
buffer.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
checksum.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
checksum.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
clippy.c lib: untrusted argument (Coverity 1448386) 2018-06-27 15:50:04 +02:00
clippy.h lib: clippy the assistant 2017-06-14 19:29:23 +02:00
command_graph.c lib: fix clippy build w/ gcc under certain configs 2018-04-26 12:31:45 -04:00
command_graph.h lib: add ability to dump cli mode graph 2018-04-22 17:14:55 -04:00
command_lex.l lib: change M:A:C to X:X:X:X:X:X 2018-10-24 21:44:33 +00:00
command_match.c *: list_delete_and_null() -> list_delete() 2018-10-02 11:40:52 +02:00
command_match.h *: reindent 2017-07-17 14:04:07 +02:00
command_parse.y lib: Convert zlog_err for clippy build 2018-08-14 20:02:05 +00:00
command_py.c Revert "isisd lib ospfd pbrd python: fix empty init" 2018-12-01 16:49:45 +01:00
command.c Merge pull request #3378 from opensourcerouting/remove-config-lock 2018-11-30 18:50:49 -05:00
command.h Merge pull request #3202 from donaldsharp/evpn_dump 2018-11-08 18:13:27 -05:00
compiler.h build: wrap "fallthrough" attr 2018-08-21 20:34:58 +02:00
csv.c Merge pull request #2965 from opensourcerouting/buildfoo-20180904 2018-09-09 14:11:10 -04:00
csv.h *: reindent 2017-07-17 14:04:07 +02:00
db.c lib: introduce new northbound API 2018-10-27 16:16:12 -02:00
db.h lib: introduce new northbound API 2018-10-27 16:16:12 -02:00
debug.c lib: add mt-safe debugging facilities 2018-03-01 15:01:25 -05:00
debug.h lib: add convenience debugging macros 2018-03-12 11:17:02 -04:00
defun_lex.l lib: early-include "config.h" in flex lexers 2018-09-09 01:16:25 +02:00
distribute.c lib: distribute-list ipv6 can be (un)configured 2018-11-09 09:43:22 +01:00
distribute.h *: reindent 2017-07-17 14:04:07 +02:00
event_counter.c *: reindent 2017-07-17 14:04:07 +02:00
event_counter.h *: reindent 2017-07-17 14:04:07 +02:00
ferr.c *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
ferr.h *: rename ferr_ref -> log_ref 2018-08-14 20:02:05 +00:00
fifo.h *: reindent 2017-07-17 14:04:07 +02:00
filter.c lib: change M:A:C to X:X:X:X:X:X 2018-10-24 21:44:33 +00:00
filter.h libs, daemons: use const in route-map apply 2018-07-23 10:34:35 -04:00
freebsd-queue.h *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
frr_pthread.c *: list_delete_and_null() -> list_delete() 2018-10-02 11:40:52 +02:00
frr_pthread.h lib: remove unused frr_pthread_yield() 2018-09-19 22:01:50 +02:00
frr_zmq.c *: style for EC replacements 2018-09-13 19:38:57 +00:00
frr_zmq.h lib: Address ZMQ lib TODOs 2017-11-23 12:50:27 +01:00
frratomic.h libs: fix missing atomics for some gcc versions 2018-08-29 15:39:19 -04:00
frrstr.c *: fix config.h/zebra.h include order 2018-09-08 21:30:42 +02:00
frrstr.h bgpd, lib, ospfd, zebra: all_digit moved to frrstr 2018-06-19 17:59:53 +02:00
getopt1.c *: reindent 2017-07-17 14:04:07 +02:00
getopt.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
getopt.h *: reindent 2017-07-17 14:04:07 +02:00
gitversion.pl build: make gitversion more useful 2017-08-02 02:59:51 +02:00
grammar_sandbox_main.c *: fix config.h/zebra.h include order 2018-09-08 21:30:42 +02:00
grammar_sandbox.c *: list_delete_and_null() -> list_delete() 2018-10-02 11:40:52 +02:00
graph.c lib: add vector_remove() to vector.[ch] 2018-06-06 16:16:12 +00:00
graph.h lib: add DFS + DOT dumping to graph datastructure 2018-04-22 17:14:55 -04:00
hash.c *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
hash.h *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
hook.c lib: flip to ISC on hook & module code 2018-12-14 16:24:06 +01:00
hook.h lib: flip to ISC on hook & module code 2018-12-14 16:24:06 +01:00
id_alloc.c libs: rename two id_alloc macros to resolve bsd conflict 2018-11-14 14:04:55 -05:00
id_alloc.h lib: Implement an allocator for 32 bit ID numbers 2018-11-09 21:50:34 +00:00
if_rmap.c *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
if_rmap.h *: reindent 2017-07-17 14:04:07 +02:00
if.c lib, ripd: rework API for converted CLI commands 2018-11-26 15:57:23 -02:00
if.h lib: retrofit interface commands to the new northbound model 2018-10-27 16:16:12 -02:00
imsg-buffer.c lib, ldpd: fix SA warnings from TAILQ oddness 2018-09-08 20:34:32 +02:00
imsg.c lib, ldpd: fix SA warnings from TAILQ oddness 2018-09-08 20:34:32 +02:00
imsg.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ipaddr.h zebra: remote RMAC for EVPN ipv6 hosts should be programmed against the ipv4 nexthop 2018-05-08 19:24:15 -04:00
jhash.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
jhash.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
json.c bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
json.h bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
keychain.c *: list_delete_and_null() -> list_delete() 2018-10-02 11:40:52 +02:00
keychain.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
lib_errors.c lib: add NB phase-specific error codes 2018-12-18 15:15:26 +01:00
lib_errors.h lib: add NB phase-specific error codes 2018-12-18 15:15:26 +01:00
libfrr.c lib: add support for confirmed commits 2018-12-07 11:11:33 -02:00
libfrr.h lib: introduce new northbound API 2018-10-27 16:16:12 -02:00
libospf.h ospf: Fix segfault if compiled with DEBUG 2017-08-09 12:07:58 +02:00
linklist.c *: list_delete_and_null() -> list_delete() 2018-10-02 11:40:52 +02:00
linklist.h *: list_delete_and_null() -> list_delete() 2018-10-02 11:40:52 +02:00
log_int.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
log.c zebra: dup addr detect zapi changes 2018-11-17 19:22:16 -08:00
log.h lib: PRIu32 in log.h 2018-09-06 20:56:41 +00:00
logicalrouter.c *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
logicalrouter.h lib: split logicalrouter and vrf netns feature 2018-02-27 11:11:24 +01:00
lua.c lua: Initial Lua import 2018-09-26 21:21:23 -04:00
lua.h lua: Initial Lua import 2018-09-26 21:21:23 -04:00
Makefile build: convert lib/ to non-recursive build 2017-07-31 23:03:27 +02:00
md5.c *: Remove cvs control points 2017-12-05 17:28:12 -05:00
md5.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
memory_vty.c lib: Cleanup include of link.h 2018-09-08 12:00:17 -04:00
memory_vty.h *: reindent 2017-07-17 14:04:07 +02:00
memory.c build: check {malloc,pthread}_np.h for *BSD 2018-09-09 01:16:25 +02:00
memory.h lib: qmem show changes (header and max) 2018-08-28 19:22:30 -04:00
module.c lib: flip to ISC on hook & module code 2018-12-14 16:24:06 +01:00
module.h lib: flip to ISC on hook & module code 2018-12-14 16:24:06 +01:00
monotime.h lib, zebra: dup addr detect display detection fields 2018-11-17 19:22:17 -08:00
mpls.c lib, zebra: Move label conversion strings to lib 2018-04-18 07:06:11 -04:00
mpls.h *: spelchek 2018-10-25 20:10:57 +02:00
netns_linux.c *: style for EC replacements 2018-09-13 19:38:57 +00:00
netns_other.c zebra: add an indirection table for ns_id 2018-04-13 16:40:32 +02:00
network.c *: LIB_[ERR|WARN] -> EC_LIB 2018-09-13 19:34:28 +00:00
network.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
nexthop_group.c *: list_delete_and_null() -> list_delete() 2018-10-02 11:40:52 +02:00
nexthop_group.h libs: add ALL_NEXTHOPS_PTR iterator macro 2018-07-10 14:07:43 -04:00
nexthop.c lib: Cleanup nexthop2str code to be consistent 2018-11-30 16:07:34 -05:00
nexthop.h lib: Add hash and use const a bit more intelligently 2018-04-06 13:22:43 -04:00
northbound_cli.c lib: copy xpaths when enqueing changes 2018-12-18 15:15:26 +01:00
northbound_cli.h lib: add support for confirmed commits 2018-12-07 11:11:33 -02:00
northbound_confd.c lib, tests: add support for keyless YANG lists 2018-12-09 13:58:53 -02:00
northbound_db.c lib: introduce new northbound API 2018-10-27 16:16:12 -02:00
northbound_db.h lib: introduce new northbound API 2018-10-27 16:16:12 -02:00
northbound_sysrepo.c lib: fix NETCONF network-wide transactions for confd and sysrepo 2018-12-07 16:01:34 -02:00
northbound.c lib: add NB phase-specific error codes 2018-12-18 15:15:26 +01:00
northbound.h lib, tests: add support for keyless YANG lists 2018-12-09 13:58:53 -02:00
ns.h lib: rename parameter for netns function 2018-04-13 16:40:32 +02:00
openbsd-queue.h *: reindent 2017-07-17 14:04:07 +02:00
openbsd-tree.c lib: RB-tree copy-paste error (Coverity 1446184) 2018-09-28 20:37:27 +02:00
openbsd-tree.h bgpd isisd lib: fix return on void functions 2018-11-20 16:32:25 +01:00
pbr.h bgpd: add an icmp flag for flowspec icmp entries 2018-06-28 11:08:59 +02:00
pid_output.c lib: When we can't lock the pid file provide a meaningfull message 2018-09-22 14:18:52 -04:00
plist_int.h lib: Convert internal sequence number to int64_t 2018-04-29 12:45:20 -04:00
plist.c bgpd lib ospf6d pbrd tests zebra: shadowing fixes 2018-09-13 17:37:08 +02:00
plist.h bgpd/ospfd: resolve warnings for bgp/ospf json commit 2018-08-30 15:54:46 +00:00
pqueue.c *: reindent 2017-07-17 14:04:07 +02:00
pqueue.h *: reindent 2017-07-17 14:04:07 +02:00
prefix.c lib: do not convert ip prefixes without '.' 2018-11-28 17:37:24 +01:00
prefix.h bgpd, lib, ospfd, zebra: all_digit moved to frrstr 2018-06-19 17:59:53 +02:00
privs.c *: LIB_[ERR|WARN] -> EC_LIB 2018-09-13 19:34:28 +00:00
privs.h lib: add frr_elevate_privs() wrapper 2018-08-14 20:02:05 +00:00
ptm_lib.c *: fix config.h/zebra.h include order 2018-09-08 21:30:42 +02:00
ptm_lib.h lib: Allow memory to be cleaned up for error cases in ptm 2017-12-04 18:59:47 -05:00
pw.h ldpd: integrate with the pseudowire manager in zebra 2017-08-09 12:35:16 +02:00
qobj.c *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
qobj.h *: reindent 2017-07-17 14:04:07 +02:00
queue.h lib, ldpd: fix SA warnings from TAILQ oddness 2018-09-08 20:34:32 +02:00
ringbuf.c *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
ringbuf.h lib: add ringbuf_copy() 2018-01-03 14:04:43 -05:00
route_types.pl lib: Restrict redistribution cli a bit 2018-04-13 12:56:19 -04:00
route_types.txt fabricd: add new daemon as build of isisd 2018-09-05 11:38:12 +02:00
routemap.c Merge branch 'pull/3197' 2018-10-23 12:31:25 +02:00
routemap.h bgpd: Check if route-map really exists before applying to the peer 2018-10-11 10:56:12 +03:00
sbuf.c lib: out-of-bounds access (Coverity 1452539) 2018-06-22 00:06:07 +02:00
sbuf.h *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
sha256.c lib: Fix memset usage 2017-10-03 12:03:56 -04:00
sha256.h *: reindent 2017-07-17 14:04:07 +02:00
sigevent.c *: LIB_[ERR|WARN] -> EC_LIB 2018-09-13 19:34:28 +00:00
sigevent.h *: reindent 2017-07-17 14:04:07 +02:00
skiplist.c *: style for EC replacements 2018-09-13 19:38:57 +00:00
skiplist.h *: reindent 2017-07-17 14:04:07 +02:00
smux.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
snmp.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
sockopt.c *: style for EC replacements 2018-09-13 19:38:57 +00:00
sockopt.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
sockunion.c *: spelchek 2018-10-25 20:10:57 +02:00
sockunion.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
spf_backoff.c lib: Remove default case statement from a enum driven switch 2018-08-23 08:36:07 -04:00
spf_backoff.h *: reindent 2017-07-17 14:04:07 +02:00
srcdest_table.c bgpd, lib, zebra: Wrapper get/set of table->info pointer 2018-09-23 20:04:39 -04:00
srcdest_table.h bgpd, lib, zebra: Wrapper get/set of table->info pointer 2018-09-23 20:04:39 -04:00
stream.c *: style for EC replacements 2018-09-13 19:38:57 +00:00
stream.h lib,bgpd: remove deprecated stream lib macros 2018-11-29 11:13:15 -05:00
strlcat.c *: fix config.h/zebra.h include order 2018-09-08 21:30:42 +02:00
strlcpy.c *: fix config.h/zebra.h include order 2018-09-08 21:30:42 +02:00
subdir.am yang: embed models into binaries 2018-11-19 23:45:24 +01:00
systemd.c *: reindent 2017-07-17 14:04:07 +02:00
systemd.h *: reindent 2017-07-17 14:04:07 +02:00
table.c *: Replace hash_cmp function return value to a bool 2018-10-19 13:14:45 -04:00
table.h bgpd, lib, zebra: Wrapper get/set of table->info pointer 2018-09-23 20:04:39 -04:00
termtable.c bgpd lib ospf6d pbrd tests zebra: shadowing fixes 2018-09-13 17:37:08 +02:00
termtable.h *: reindent 2017-07-17 14:04:07 +02:00
thread.c lib: add thread_timer_remain_msec function 2018-12-04 12:49:25 +01:00
thread.h lib: add thread_timer_remain_msec function 2018-12-04 12:49:25 +01:00
vector.c lib: add vector_compact(), use after str splits 2018-06-06 16:16:12 +00:00
vector.h lib: add vector_compact(), use after str splits 2018-06-06 16:16:12 +00:00
version.h.in lib: add cli preprocessor for | actions 2018-06-06 16:15:34 +00:00
vlan.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
vrf_int.h *: reindent 2017-07-17 14:04:07 +02:00
vrf.c lib, zebra: default vrf configured will not be overwritten by discovery 2018-11-21 17:21:19 +01:00
vrf.h lib, zebra: default vrf configured will not be overwritten by discovery 2018-11-21 17:21:19 +01:00
vty.c lib: add support for confirmed commits 2018-12-07 11:11:33 -02:00
vty.h lib: copy xpaths when enqueing changes 2018-12-18 15:15:26 +01:00
vxlan.h lib, zebra: Allow the specification of BUM flooding 2018-10-11 20:22:19 -04:00
wheel.c *: list_delete_and_null() -> list_delete() 2018-10-02 11:40:52 +02:00
wheel.h lib, pimd: Convert timer_wheel to use thread_execute_name 2018-09-13 10:51:13 -04:00
workqueue.c libs: support timeout for workqueue retries 2018-12-13 14:08:39 -05:00
workqueue.h libs: support timeout for workqueue retries 2018-12-13 14:08:39 -05:00
yang_translator.c Merge pull request #3342 from opensourcerouting/nb-operational-data 2018-11-29 15:19:38 -05:00
yang_translator.h lib: introduce new northbound API 2018-10-27 16:16:12 -02:00
yang_wrappers.c lib: fix issue with yang_str2enum 2018-12-18 15:15:26 +01:00
yang_wrappers.h lib: use prefixconstptr instead of const prefixptr 2018-11-26 17:35:58 -02:00
yang.c lib: add frr-isisd to the native models 2018-12-18 15:25:57 +01:00
yang.h Merge pull request #3342 from opensourcerouting/nb-operational-data 2018-11-29 15:19:38 -05:00
zassert.h *: Remove cvs control points 2017-12-05 17:28:12 -05:00
zclient.c lib, zebra: default vrf configured will not be overwritten by discovery 2018-11-21 17:21:19 +01:00
zclient.h bgpd, zebra: auto assign labels from label pool to regular prefixes in BGP labeled unicast 2018-12-20 15:28:52 +03:00
zebra.h bgpd, zebra: auto assign labels from label pool to regular prefixes in BGP labeled unicast 2018-12-20 15:28:52 +03:00