Donald Sharp [Thu, 19 Nov 2020 13:04:51 +0000 (08:04 -0500)]
ospf6d: More lists being leaked
Apparently the person who wrote this code was big into
cut-n-paste. Commit 710a61d57c8f1b0ea66a37f09bad2161d7e2ddb7
found the first instance, but upon code inspection this morning
it became evident that 2 other functions had the exact same
problem.
Fix. Note I have not cleaned up the cut-n-paste code for
two reasons: a) I'm chasing something else b) this code
has been fairly un-maintained for a very long time. No
need to start up now.
Donald Sharp [Wed, 18 Nov 2020 16:04:27 +0000 (11:04 -0500)]
bgpd, lib, nhrpd, zebra: verify return of sockunion2hostprefix
The return from sockunion2hostprefix tells us if the conversion
succeeded or not. There are places in the code where we
always assume that it just `works`, since it can fail
notice and try to do the right thing.
Please note that failure of this function for most cases
of sockunion2hostprefix is highly highly unlikely as that
the sockunion was already created and tested elsewhere
it's just that this function can fail.
when deleting a whole l2vpn context in ldpd which also had pseudowires
in it, we were first deleting the l2vpn with a 'no l2vpn XXX' command,
and then adding it again by running 'l2vpn XXX\n no member pseudowire YYY'
which obviously was not needed. As a result the l2vpn would be reinstated.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Vincent Bernat [Tue, 17 Nov 2020 19:29:31 +0000 (20:29 +0100)]
bgpd: identify passive connections in JSON summary
When using non JSON output, passive connections are marked with:
BGP state = Active (passive)
However, such an information is not available in JSON output. This
commit adds that. It also adds "Active (NSF passive)" flag, like the
regular output.
Chirag Shah [Tue, 17 Nov 2020 02:42:20 +0000 (18:42 -0800)]
bgpd: convert to yang modeled nbr cmds
Convert to (DEFUN_YANG) yang modeled neighbor configuration
commands to count them in batched execution as part of backoff timer
introduced as part of PR # 6727
These configuration commands already converted transactional cli
but missed to mark them as (DEFUN_YANG).
pimd: checksum must be validated before accepting igmp packets
Issue: When an IGMPv2 leave packet is received, it did not validate
the checksum and hence the packet is accepted and group specific
query is sent out in response to this.
Due to this IGMP conformance test case 6.1 failed.
GalaxyGorilla [Tue, 17 Nov 2020 13:11:34 +0000 (13:11 +0000)]
tests: ignore Windows vs Unix style newlines
Within unit tests the output of vtysh commands is compared to hand
made reference files. For some reason the output of those vtysh
commands contains Windows Style newlines which results in error
outputs which make it hard to identify this problem.
Since there seems to be no benefit in checking those newlines
anyway this commit just normalizes them.
Donald Sharp [Thu, 12 Nov 2020 21:14:29 +0000 (16:14 -0500)]
lib: Change zlog_debug to zlog_err for doc string issues
Modify the code to change from zlog_debug to zlog_err.
vtysh was not outputting the vtysh doc string issues
after a change a couple of months back. By changing
to error level we start seeing them on vtysh start up
again. This will allow us to catch these issues
in the CI runs again.
Donald Sharp [Mon, 16 Nov 2020 20:12:43 +0000 (15:12 -0500)]
lib: When aborting log data
When a FRR process dies due to SIGILL/SIGABORT/etc attempt
to drain the log buffer. This code change is capturing
some missing logs that were not part of the log file on
a crash.
Carlo Galiotto [Fri, 13 Nov 2020 16:35:06 +0000 (17:35 +0100)]
ospfd: reset mpls-te prior to ospf router removal
This commits attempts to fix a problem that occurs when mpls-te gets
removed from ospfd config. Mpls-te has an inter-as option, which can be
set to Off/Area/AS. Whenever the inter-as takes "Area" or "AS" as a
value, this value will not be cleaned after removing mpls-te or after
removing the ospf router. Therefore, if mpls-te is configured with
inter-as AS or Area and we remove mpls-te or the ospf router, the
inter-as will still preserve its value; therefore, next time mpls-te is
enabled, it will automatically inherits the previous inter-as value
(either Area or AS). This leads to wrong configuration, which can be a
problem for frr_reload.py.
The commits forces mpls-te to reset inter-as to Off before it mpls-te
gets removed from the configuration and before the ospf router gets
removed.
Donald Sharp [Wed, 11 Nov 2020 19:14:37 +0000 (14:14 -0500)]
*: Convert all usage of zclient_send_message to new enum
The `enum zclient_send_status` enum needs to be extended
throughout the code base to use the new states and
to fix up places where we tested against the return
value being non zero.
Donald Sharp [Fri, 6 Nov 2020 20:47:07 +0000 (15:47 -0500)]
sharpd: Add buffering support
Have sharpd notice that when sending routes to zebra that the
underlying system has buffered data and to pause sending
more data to zebra until such time we get a callback that
the write was successful to zebra.
Donald Sharp [Fri, 6 Nov 2020 13:19:53 +0000 (08:19 -0500)]
sharpd: Re-arrange route_add|delete
These functions are never called outside of sharp_zebra.c, re-arrange
a little to make the inclusions in sharp_zebra.h not needed and
to also have these functions return whether or not the underlying
buffering system was invoked in stream sending.
Donald Sharp [Mon, 12 Oct 2020 13:51:09 +0000 (09:51 -0400)]
bgpd, lib: Indicate when we are buffering instead of immediately sending down ZAPI
When FRR sends data over the ZAPI protocol from the upper levels to zebra, indicate
to the calling functions that we have started buffering data to be sent if the
socket is full underneath it.
Also add a call back function `zebra_buffer_write_ready` that we can call
when an upper level protocol's socket buffer has been drained.
Donald Sharp [Mon, 26 Oct 2020 12:46:57 +0000 (08:46 -0400)]
lib, zebra: Add ability to read kernel notice of Offload Failed
The linux kernel is getting RTM_F_OFFLOAD_FAILED for kernel routes
that have failed to offload. Write the code
to receive these notifications from the linux kernel
and store that data for display about the routes.