Resizing the route array can fail. Although the error condition is
already correctly handled, if we're more explicit about the variables we
expect to be initialized then clang-analyze is happier.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
The return value of XCALLOC will always be non-null. Even if it were to
be null, this code would still crash with a NPD.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
These asserts verify that the status correlates with the expected result
and fixes a clang-analyze warning.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
OSPF_IF_PARAM_CONFIGURED(S, P) checks both the nullity of S and the
value of P; assuming either one from the value of this macro is
incorrect.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Here we have a block conditional on the nullity of a pointer, followed
by a dereferennce of the same pointer. Move the deref into the
conditional block.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
clang-analyze complains that data may be null, and since we didn't
explicitly check it (although we did check the overall packet length
minus the header length) it has a point.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
When neighbor state transition from LOADING to
FULL state, active full neighbors count incremented.
The full neighbors count is used for router-id change
if any full neighbor exist, displays message to restart
ospf6/frr to activate new router-id.
In the case of P-t-P neighbor type neighbor transition
from EXCHANGE to FULL which missed full neighbors count.
Ticket:CM-20574
Testing Done:
Initially, Bring up zebra assigned router-id in ospf6
with point-to-point link based neighbor.
Configure static router-id where restart of ospf6 message
is displayed.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
[zebra/zebra_vxlan.c:5779] -> [zebra/zebra_vxlan.c:5778]:
(warning) Either the condition 'if(svi_if_zif&&svi_if_link)'
is redundant or there is possible null pointer dereference: svi_if_zif.
Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
rn cannot be null here
issue detected by cppcheck:
[ripd/rip_snmp.c:208] -> [ripd/rip_snmp.c:207]: (warning) Either the condition
'if(rn&&!strncmp(i->name,ifp->name,INTERFACE_NAMSIZ))' is redundant or there is
possible null pointer dereference: rn.
Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
The docs extract various configuration values from config.status and
substitute them into placeholders throughout the docs. Add the ability
to build the docs with some reasonable defaults set instead of failing
when config.status doesn't exist.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Pygments 2.2+ has `load_lexer_from_file`, but it looks like some of our
build platforms are on an older version.
Also gotta include the new file in dist tarball.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Currently, we just package the frr daemons, but we don't run
them. This is fine for basic tests, but it is inconvenient to
orchestrate the daemons from downstream test environments.
Here, we follow the redhat and debianpkg formats more closely,
putting the daemons in /usr/lib/frr and including the frr user
and groups in the package. We also include a docker specific
startup script and a sysvinit link in /etc/init.d/frr for
openrc based alpine installs.
Testing done:
Built packages, built base images, everything seems to work fine.
Uninstalled the package, all the daemons stopped.
Issue: https://github.com/FRRouting/frr/issues/2030
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
Vincent Bernat has written a small Pygments lexer for IOS / Quagga
config files that works just as well on FRR stuff. Pulled that into our
docs with his blessing.
Also changed the background color on our code blocks away from that
kinda ugly green to gray, which looks way better with the syntax
highlighting changes that are about to happen in the next commit.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Use the proper section markup as defined in workflow.rst.
This helps Sphinx organize sections properly.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Short and long form options can be written on the same line, Sphinx
understands how to cross-reference using either one of them. Also
replace some - with _ where appropriate.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Background:
v6 does not have route replace semantics. If you want to add a nexthop
to an existing route, you just send RTM_NEWROUTE and the new nexthop.
If you want to delete a nexthop you should just send RTM_DELROUTE
with the removed nexthop.
This leads to situations where if zebra is processing a route
and has lost track of intermediate nexthops( yes this sucks )
then v6 routes will get out of sync when we try to implement
route replace semantics.
So notice when we are doing a route delete and the route is
not being updated, just send the prefix and tell it too delete.
Ticket: CM-20391
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit does 2 things:
1) When receiving a route from the kernel, display the incoming
table as part of the debug, to facilatate knowing what we are
talking about as part of the debug.
2) When displaying nexthop information for routes we were sending
to the kernel, no need to display the route information every time
Display the route then the individual nexthops for what we are doing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Notice when someone deletes a neighbor entry we've put in for
rfc-5549 gets deleted by some evil evil person. When this happens
notice and push it back in, immediately.
Ticket: CM-18612
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
The code to reinstall self originated routes was not behaving
correctly. For some reason we were looking for self originated
routes from the kernel to be of type KERNEL. This was probably
missed when we started installing the route types. We should
depend on the self originated flag that we determine from
the callback from the kernel.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
Most presumably, the nexthop IP is present, only when ECOM redirect IP
is present. The nexthop is displayed.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This extended ecommunity is defined with
draft-ietf-idr-flowspec-redirect-ip-02 and is read from the BGP update
received.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>