]>
git.puffer.fish Git - mirror/frr.git/log
Donald Sharp [Fri, 6 Oct 2017 13:19:45 +0000 (09:19 -0400)]
eigrpd: Convert topology list to a table
The EIGRP topology list is an extremely inefficient
way to store data about the known routes. Convert
to using a table.
Signed-off-by: Donald Sharp <sharpd@cumulusnetorks.com>
Renato Westphal [Mon, 23 Oct 2017 23:54:09 +0000 (21:54 -0200)]
Merge pull request #1330 from donaldsharp/zclient_shenanigans
Zclient shenanigans
Renato Westphal [Mon, 23 Oct 2017 23:51:08 +0000 (21:51 -0200)]
Merge pull request #1354 from chiragshah6/mdev1
ospfd: show comand for ospf packet stats
Donald Sharp [Mon, 23 Oct 2017 22:10:01 +0000 (18:10 -0400)]
bgpd: Use stored ifindex for zebra_announce
In some situations we already know the ifp and by extension
the ifindex there is no need to look it up for every
route we send to zebra.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 19:05:06 +0000 (15:05 -0400)]
zebra: Allow zebra_client_read to handle up to 10 messages
The zebra_client_read functionality was reading 1 message
from a peer at a time. Modify the code so that we can
read up to 10 at a time.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 14:37:20 +0000 (10:37 -0400)]
*: Modify zclient_init to require privs data
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 14:23:12 +0000 (10:23 -0400)]
ripngd: Make 'struct zebra_privs_t' available
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 14:20:15 +0000 (10:20 -0400)]
ripd: Make 'struct zebra_privs_t' available
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 14:13:59 +0000 (10:13 -0400)]
ospf6d: Make 'struct zebra_privs_t' available
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 14:11:07 +0000 (10:11 -0400)]
ospfd: Make 'struct zebra_privs_t' available.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 13:34:44 +0000 (09:34 -0400)]
isisd: Allow struct zebra_privs_t to be available
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 13:29:39 +0000 (09:29 -0400)]
eigrpd: Make struct zebra_privs_t available
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 13:24:09 +0000 (09:24 -0400)]
nhrpd: Let struct zebra_privs_t be available
signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 13:19:43 +0000 (09:19 -0400)]
babeld: Make the zebra_privs_t available for use
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 13:16:46 +0000 (09:16 -0400)]
zebra: Set zapi send/receive buffer to a larger value
Allow a bit more to buffer before we stop zebra
from sending/receiving.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 13:06:02 +0000 (09:06 -0400)]
lib: Cleanup some missed reformat
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 12:58:02 +0000 (08:58 -0400)]
zebra: Add a function handler for zserv commands
The zserv command handlers make an already long function
even longer. Isolate this code so that we can rearrange
the zebra_client_read function.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 12:41:29 +0000 (08:41 -0400)]
zebra: Make all zserv handler functions use zvrf instead of vrf_id
Some handler functions were using vrf_id, standardize onto
zvrf being passed around instead.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 12:31:35 +0000 (08:31 -0400)]
zebra: No need to pass sock descriptor around.
Standardize the api to read zapi requests from protocols.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 11 Oct 2017 12:09:28 +0000 (08:09 -0400)]
zebra: Always read full zapi message in ptm code
The ptm code when it encountered an error situation
was not fully reading all the data in the stream
meant for it. Ensure that this is read.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Chirag Shah [Mon, 23 Oct 2017 18:59:29 +0000 (11:59 -0700)]
ospfd: reset ospf interface protocol stats
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Chirag Shah [Thu, 19 Oct 2017 23:57:31 +0000 (16:57 -0700)]
ospfd: show comand for ospf packet stats
Display OSPFv2 Protocol packets stats per interface.
tor-1# show ip ospf vrf all interface traffic
Interface HELLO DB-Desc LS-Req LS-Update LS-Ack
Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx
------------------------------------------------------------
swp1 1/0 2/3 1/1 2/2 1/1
swp2 6/0 2/7 1/1 1/4 3/2
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Renato Westphal [Mon, 23 Oct 2017 13:27:02 +0000 (11:27 -0200)]
Merge pull request #1341 from chiragshah6/ospf_vrf_dev
ospf6d: Divide LSupdate to keep size small
Donald Sharp [Mon, 23 Oct 2017 12:33:30 +0000 (08:33 -0400)]
Merge pull request #1353 from opensourcerouting/rpm-fix-master
Rpm fix master
Donald Sharp [Sat, 21 Oct 2017 12:19:09 +0000 (08:19 -0400)]
Merge pull request #1349 from opensourcerouting/bgpd_listen_queue
bgpd: bump listen() backlog
Martin Winter [Sat, 21 Oct 2017 01:22:24 +0000 (18:22 -0700)]
redhat: Fix doc by removing outdated package information and point to main doc/ directory for it
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Fri, 20 Oct 2017 23:33:39 +0000 (16:33 -0700)]
redhat: Fix rpm scripts to correctly restart daemons on upgrade
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Fri, 20 Oct 2017 21:06:05 +0000 (14:06 -0700)]
redhat: Add fix to correct watchfrr config during upgrade
- /etc/frr/daemon is a config file and won't be replaced, do quick sed fix
- Updated changelog
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Conflicts:
redhat/frr.spec.in
Martin Winter [Fri, 20 Oct 2017 02:36:59 +0000 (19:36 -0700)]
redhat: systemd file should not be executable
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Martin Winter [Fri, 20 Oct 2017 01:02:45 +0000 (18:02 -0700)]
redhat: Always reference main frr start/stop script in /usr/lib/frr
* Fixes issue where daemon default config tried to use /etc/init.d/frr script which doesn't exist on systemd systems
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Conflicts:
redhat/daemons
Chirag Shah [Wed, 18 Oct 2017 04:54:29 +0000 (21:54 -0700)]
ospf6d: Divide LSupdate to keep size small
Within OSPFv3 area, Disect Router LSA and
Intra-prefix LSA in order to keep LSA size Small.
Each LSA has unique Link State ID assigned.
Intra-Area-Prefix LSA:
Spread prefixes across multiple intra-area-prefix-LSAs.
Ticket:CM-18069
Testing Done:
Tested 92 ospf6 enabled (point-to-point) interfaces
between two routers.
92 adajancy comes up with Full Neighborship.
Validated 'show ipv6 ospf6 database router detail' &
'show ipv6 ospf6 database intra-prefix detail', each adv-router
has two distinct LSA of such catgory.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Rafael Zalamena [Fri, 20 Oct 2017 21:29:07 +0000 (19:29 -0200)]
bgpd: bump listen() backlog
Handle better stress situations when multiple peers are trying to
connect at the same time by bumping the TCP connection backlog limit.
This reduces the convergence time of BGPerf stress test.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Donald Sharp [Fri, 20 Oct 2017 17:43:20 +0000 (13:43 -0400)]
Merge pull request #1347 from medallia/all-routes-to-fpm
Send all routes to FPM, including VRF and multicast
Thorvald Natvig [Fri, 20 Oct 2017 06:34:42 +0000 (23:34 -0700)]
Send all routes to FPM, including VRF and multicast
Signed-off-by: Thorvald Natvig <thorvald@medallia.com>
Renato Westphal [Thu, 19 Oct 2017 01:52:41 +0000 (23:52 -0200)]
Merge pull request #1331 from donaldsharp/hash_speedup
lib: Allow hash_get to sidestep expensive hash key generation in someā¦
Renato Westphal [Thu, 19 Oct 2017 01:46:48 +0000 (23:46 -0200)]
Merge pull request #1332 from chiragshah6/ospf_vrf_dev
ospf6d: Handle lsupdate upto max ospf6 payload
Renato Westphal [Thu, 19 Oct 2017 01:12:31 +0000 (23:12 -0200)]
Merge pull request #1272 from donaldsharp/peer_group_ordering
bgpd: Fix peer group copying of data for late activation
Martin Winter [Thu, 19 Oct 2017 00:05:46 +0000 (17:05 -0700)]
Merge pull request #1339 from donaldsharp/bgp_compile_issues
Bgp compile issues
Donald Sharp [Wed, 18 Oct 2017 22:39:04 +0000 (18:39 -0400)]
bgpd: Fix 'not initialized' possibly on older compilers
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 18 Oct 2017 22:37:38 +0000 (18:37 -0400)]
bgpd: Fix off by one error introduced by
8c9cc7bbf657e3440d9bc758fe45aef5f43c989f
Commit
8c9cc7bbf657e3440d9bc758fe45aef5f43c989f changed the size
of the `struct bgp_attr_encap_subtlv` type to be a zero length
array at the end instead of having a 1 byte. All memory allocations
for this subsuquently were off by 1 byte since those were not
adjusted either.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Jafar Al-Gharaibeh [Wed, 18 Oct 2017 04:03:43 +0000 (23:03 -0500)]
Merge pull request #1333 from donaldsharp/command_py_leak
lib: Fix small memory leak when using command_py.c
Lou Berger [Wed, 18 Oct 2017 01:56:23 +0000 (21:56 -0400)]
Merge pull request #1334 from donaldsharp/large_number
Large number
Donald Sharp [Wed, 18 Oct 2017 00:57:40 +0000 (20:57 -0400)]
bgpd: Display unsigned ints
We are storing data as an unsigned int and we should not
display it as a signed number.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 18 Oct 2017 00:49:15 +0000 (20:49 -0400)]
lib: Display unsigned instead of signed
When displaying thread cpu data, display unsigned instead
of signed data when we get really really really large
numbers of invocations.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 17 Oct 2017 13:22:41 +0000 (09:22 -0400)]
lib: Fix small memory leak when using command_py.c
When free'ing memory associated with the wgraph, also
free memory malloced during the initialization.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Olivier Dugeon [Tue, 17 Oct 2017 08:28:37 +0000 (10:28 +0200)]
Merge pull request #1308 from chiragshah6/mdev1
ospfd: fix ospf nssa command
Chirag Shah [Thu, 12 Oct 2017 22:10:50 +0000 (15:10 -0700)]
ospf6d: Handle lsupdate upto max ospf6 payload
While traversing LSUpdate list, if LSUpdate message
fills up (w/ LSAs) to the interface MTU size,
Send the existing filled LSUpdate message if max
payload exceeds max ospf6 payload,
reset sendbuf (buffer) to fill rest of
the remaining LSAs.
Add relevant fields to debugs.
Ticket:CM-18069
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Jafar Al-Gharaibeh [Tue, 17 Oct 2017 04:36:19 +0000 (23:36 -0500)]
Merge pull request #1290 from qlyoung/doc-commit-msgs
doc: add docs for commit message format
Jafar Al-Gharaibeh [Tue, 17 Oct 2017 04:35:16 +0000 (23:35 -0500)]
Merge pull request #1300 from chiragshah6/mdev
ospf6d: fix ospf6d crash during sigterm/shutdown
Lou Berger [Mon, 16 Oct 2017 18:51:02 +0000 (14:51 -0400)]
Merge pull request #1324 from donaldsharp/bgp_aspath
bgpd: Add ability to display information about bestpath in json
Donald Sharp [Mon, 16 Oct 2017 18:47:08 +0000 (14:47 -0400)]
lib: No need to call apply_mask 2 times
route_node_set is only called by route_node_get
which calls apply_mask. There is no need to do
this again.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 16 Oct 2017 17:56:01 +0000 (13:56 -0400)]
lib: Allow hash_get to sidestep expensive hash key generation in some cases
There is no need to generate a hash key *if* the hash_alloc_function
is NULL and the hash is empty.
This changed showed a measurable increase in performance for
table hash lookup for tables that were meant to be empty in
bgp( the distance commands ).
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Chirag Shah [Sat, 7 Oct 2017 20:26:13 +0000 (13:26 -0700)]
ospfd: fix ospf nssa command
-Fix ordering of nssa command with translate options
and no-summary option.
Just like ospf stub no-summary keep the order order
of nssa no-summary.
- Fix NSSA options.
- Avoid displaying translate-candiate (default) option
in running-config.
cumulus(config-router)# area 2.2.2.2 nssa
<cr>
no-summary Do not inject inter-area routes into nssa
translate-always Configure NSSA-ABR to always translate
translate-candidate Configure NSSA-ABR for translate election (default)
translate-never Configure NSSA-ABR to never translate
Running-config output:
router ospf
area 2.2.2.2 nssa translate-always
area 2.2.2.2 nssa no-summary
Ticket:CM-8312
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Donald Sharp [Mon, 16 Oct 2017 16:00:59 +0000 (12:00 -0400)]
Merge pull request #1313 from LabNConsulting/working/master/patch-set/block-non-core-fix-assert
bgpd: only allow unicast|multicast config commands in non-core BGP instances
Donald Sharp [Mon, 16 Oct 2017 16:00:38 +0000 (12:00 -0400)]
Merge pull request #1298 from opensourcerouting/iface-rb-tree
Use rb-trees to store interfaces instead of linked-lists
Renato Westphal [Wed, 11 Oct 2017 14:59:15 +0000 (11:59 -0300)]
Merge pull request #1305 from donaldsharp/workqueue
lib: Free workqueue memory leak on free
Renato Westphal [Wed, 11 Oct 2017 14:16:17 +0000 (11:16 -0300)]
Merge pull request #1317 from donaldsharp/babel_mem
babeld: Do not copy beyond end of data
Donald Sharp [Sat, 7 Oct 2017 01:40:08 +0000 (21:40 -0400)]
lib: Free workqueue memory leak on free
When free'ing the workqueue if you have items
on the workqueue you should free the memory associated
with it.
Additionally move the work_queue_item_remove function
to allow for static to be awesome
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Renato Westphal [Wed, 11 Oct 2017 13:48:20 +0000 (10:48 -0300)]
Merge pull request #1322 from donaldsharp/ospf6_proto
ospf6d: Make ospf6_prefix have an empty v6 addr at end
Donald Sharp [Tue, 10 Oct 2017 17:07:16 +0000 (13:07 -0400)]
ospf6d: Make ospf6_prefix have an empty v6 addr at end
The `struct ospf6_prefix` type expects to have space allocated
at the end of the structure for a v6 prefix. So let's tell
the compiler that there might be more there. This is to fix
a coverity scan warning.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 10 Oct 2017 20:30:36 +0000 (16:30 -0400)]
bgpd: Add ability to display information about bestpath in json
When retrieving information about neighbors or summary in json
add some information about what bestPath particulars we have for
this bgp session.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Martin Winter [Wed, 11 Oct 2017 07:36:07 +0000 (00:36 -0700)]
Merge pull request #1120 from donaldsharp/branch_million
configure: Have --enable-dev turn on better debugging.
Renato Westphal [Tue, 10 Oct 2017 23:59:45 +0000 (20:59 -0300)]
Merge pull request #1323 from donaldsharp/ospf_list_delete
ospfd: Fix ships in the night PR's and list_delete
Donald Sharp [Tue, 10 Oct 2017 21:35:19 +0000 (17:35 -0400)]
ospfd: Do not delete write_q 2 times either
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 10 Oct 2017 21:08:32 +0000 (17:08 -0400)]
ospfd: We should not be deleting ospf->oiflist 2 times
The ospf->oiflist deletion is happening 2 times now.
Let's delete it once only.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 10 Oct 2017 17:33:14 +0000 (13:33 -0400)]
ospfd: Fix ships in the night PR's and list_delete
list_delete_and_null should be used.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Renato Westphal [Tue, 10 Oct 2017 18:14:21 +0000 (15:14 -0300)]
Merge pull request #1304 from chiragshah6/ospf_vrf_dev
ospfd: OSPFv2 VRF, add vrf_name in show command output
Renato Westphal [Tue, 10 Oct 2017 17:51:02 +0000 (14:51 -0300)]
Merge pull request #1316 from donaldsharp/high_stuff
High stuff
Donald Sharp [Tue, 10 Oct 2017 16:57:22 +0000 (12:57 -0400)]
Merge pull request #1319 from opensourcerouting/ldpd-use-after-free
ldpd: fix heap-use-after-free at exit
Chirag Shah [Fri, 6 Oct 2017 22:32:25 +0000 (15:32 -0700)]
ospfd: OSPFv2 VRF abstact api
Create an api to display vrf name in vty or json format.
Use VRF Name for vtysh and vrfName for json output.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Jafar Al-Gharaibeh [Tue, 10 Oct 2017 16:42:26 +0000 (11:42 -0500)]
Merge pull request #1314 from donaldsharp/pim_rpf_address
Pim rpf address
Chirag Shah [Sun, 17 Sep 2017 22:44:39 +0000 (15:44 -0700)]
ospfd: OSPFv2 VRF, vrf in show command output
Add VRF name in both vtysh and json format of
show commands.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Donald Sharp [Wed, 4 Oct 2017 12:04:00 +0000 (08:04 -0400)]
ospfd: Free memory associated with ospf instance startup
We have memory that is initialized upon ospf instance
and area startup. Free it up on shutdown.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 4 Oct 2017 11:55:58 +0000 (07:55 -0400)]
ripngd: Fix possible memory leak of route_node
There exists a path where we do not save the route_node
after creation. Allow cleanup.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 10 Oct 2017 16:29:54 +0000 (12:29 -0400)]
lib: Add some documentation about argv_find
We expect that the index value passed in for argv_find
should be initially set to 0. This way if the cli
ever changes there is no need to modify the initial
value.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 9 Oct 2017 20:23:30 +0000 (16:23 -0400)]
lib: Fix missing va_end
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 9 Oct 2017 20:09:48 +0000 (16:09 -0400)]
ospfd: Fix leak of route_node
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 9 Oct 2017 20:09:23 +0000 (16:09 -0400)]
ospfd: Fix leak of stream
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 9 Oct 2017 20:08:45 +0000 (16:08 -0400)]
ospfd: Fix memory leak
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 9 Oct 2017 20:08:08 +0000 (16:08 -0400)]
ospfd: Fix leak of FD
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 9 Oct 2017 20:06:06 +0000 (16:06 -0400)]
pimd: Fix uninited idx for argv_find
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 7 Oct 2017 12:53:35 +0000 (08:53 -0400)]
isisd: Fix leaked memory in error case
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 10 Oct 2017 16:19:37 +0000 (12:19 -0400)]
Merge pull request #1210 from opensourcerouting/misc-mpls-bgp-lu-fixes
Misc BGP-LU fixes
Renato Westphal [Tue, 10 Oct 2017 15:25:23 +0000 (12:25 -0300)]
Merge pull request #1315 from dslicenc/bgp-interface
bgpd: check for bgp instance before processing interfaces
Renato Westphal [Tue, 10 Oct 2017 12:41:26 +0000 (09:41 -0300)]
ldpd: send correct notification code upon receipt of malformed packet
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Tue, 10 Oct 2017 12:22:41 +0000 (09:22 -0300)]
ldpd: fix heap-use-after-free at exit
This problems happens because, in this port, whenever the child
processes want to log something they send a message to the parent. But
in the shutdown functions the first thing we do is to close the pipes
to the parent process. With that said, add some protections to prevent
the child processes from trying to use a closed pipe and just ignore
their log messages during shutdown. In the future we need to share
the logging configuration with the child processes so they can send
log messages on their own.
While here, remove some unnecessary calls to msgbuf_write() in
ldpe_shutdown().
Fixes #1253.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Fri, 6 Oct 2017 18:25:58 +0000 (15:25 -0300)]
*: use the FOR_ALL_INTERFACES abstraction from babeld
This improves code readability and also future-proofs our codebase
against new changes in the data structure used to store interfaces.
The FOR_ALL_INTERFACES_ADDRESSES macro was also moved to lib/ but
for now only babeld is using it.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Donald Sharp [Fri, 6 Oct 2017 12:41:36 +0000 (08:41 -0400)]
ospf6d: Add missing vrf lookup
The vrf lookup was missed in this conversion?
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Renato Westphal [Wed, 4 Oct 2017 23:13:56 +0000 (20:13 -0300)]
lib: fix bug in if_cmp_name_func()
If the p1 and p2 arguments pointed to identical strings ending with
a non-numeric character (e.g. "lo"), this function would return -1
instead of 0 as one would expect. This inconsistency didn't matter
for sorted linked-lists but for red-black trees it's a major source
of problems.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Tue, 3 Oct 2017 01:06:04 +0000 (22:06 -0300)]
*: introduce new rb-tree to optimize interface lookup by ifindex
Performance tests showed that, when running on a system with a large
number of interfaces, some daemons would spend a considerable amount
of time in the if_lookup_by_index() function. Introduce a new rb-tree
to solve this problem.
With this change, we need to use the if_set_index() function whenever
we want to change the ifindex of an interface. This is necessary to
ensure that the 'ifaces_by_index' rb-tree is updated accordingly. The
return value of all insert/remove operations in the interface rb-trees
is checked to ensure that an error is logged if a corruption is
detected.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Tue, 3 Oct 2017 01:06:03 +0000 (22:06 -0300)]
*: eliminate IFINDEX_DELETED in favor of IFINDEX_INTERNAL
IFINDEX_DELETED is not necessary anymore as we moved from a global
list of interfaces to a list of interfaces per VRF.
This reverts commit
84361d615 .
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Tue, 3 Oct 2017 01:06:01 +0000 (22:06 -0300)]
*: use rb-trees to store interfaces instead of sorted linked-lists
This is an important optimization for users running FRR on systems with
a large number of interfaces (e.g. thousands of tunnels). Red-black
trees scale much better than sorted linked-lists and also store the
elements in an ordered way (contrary to hash tables).
This is a big patch but the interesting bits are all in lib/if.[ch].
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Tue, 3 Oct 2017 01:06:00 +0000 (22:06 -0300)]
lib: register 'if_var_handlers' only once
There's no need to register 'if_var_handlers' for every VRF, we need
to do it only once.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Tue, 3 Oct 2017 01:05:57 +0000 (22:05 -0300)]
lib: nuke the if_*_by_name_len() functions
Make use of strnlen() and strlcpy() so we can get rid of these
convoluted if_*_by_name_len() functions.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Tue, 10 Oct 2017 12:00:44 +0000 (09:00 -0300)]
Merge pull request #1301 from donaldsharp/zebra_vxlan
Zebra vxlan
Lou Berger [Tue, 10 Oct 2017 11:29:40 +0000 (07:29 -0400)]
rfapi: whitespace change and add debug check
Signed-off-by: Lou Berger <lberger@labn.net>
Donald Sharp [Mon, 9 Oct 2017 20:36:52 +0000 (16:36 -0400)]
babeld: Do not copy beyond end of data
The function really_send_update takes a 'const unsigned char *id'.
and is called with myid(a 8 byte array) and route->src->id(an 8
byte array), but we copy these pointers into
babel_ifp->buffered_id which is a 16 byte array.
Adjust the size of buffered_id to be 8 bytes and fix the copy
to only copy the 8 bytes.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Renato Westphal [Mon, 9 Oct 2017 23:27:57 +0000 (20:27 -0300)]
Merge pull request #1297 from dslicenc/cm18154-import-table
zebra: resolve issue with importing table entries correctly
Renato Westphal [Wed, 20 Sep 2017 03:04:58 +0000 (00:04 -0300)]
zebra: use a switch statement in nexthop_set_resolved()
This makes the function much easier to read, and also faster.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Wed, 20 Sep 2017 03:04:04 +0000 (00:04 -0300)]
bgpd: remove 'network' commands from the BGP_IPV6L node
These commands don't belong in the BGP_IPV6L_NODE node anymore. A similar
change was done for BGP_IPV4L_NODE in commit
9bedbb1e5 .
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>