Commit Graph

13160 Commits

Author SHA1 Message Date
Donald Sharp
45301f8cb2 ospfd: Convert ospf_routemap.c to use error card subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
abcc171c93 ospfd: Convert ospf_network.c to use error code subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
266469ebab ospfd: Cleanup some warnings that were not warnings
1) stream allocation cannot fail
2) some warnings were removed when functions safely ignored
the calling parameters being wrong.
3) some warnings were removed when functions did not consider
the state as an error since we did not return an error code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
0e411ce681 lib: Modify zlog_warn to vty_out
The vty_prefix_list_install function was modifying the prefix to match the
specified prefix length and warning in the log file.  Modify
code to use zlog_info as that a warn implies that something has
gone terribly wrong.  Additionally display to the terminal as
well so that user can get immediate feedback from something
that they can correct.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
0351a28f2a lib: Convert vrf.c to use new error-code subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
ff9d9d5ba1 lib: Convert sigevent.c to use new error-code-subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
3469901633 lib: Convert vty.c to use new error-code subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
040c7c3a9f lib: Convert routemap.c to use new error-code subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
ff245f0e02 lib: Convert privs.c to use new error-code subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
fc41c1531f lib: Convert network.c to use new error subsystem codes
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
9ef9495e3a lib: Convert thread.c to use new error-code subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
8b895cd32f lib: Convert netns_linux.c to new error-code work
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
0bff8eea70 lib: Convert libfrr.c to use new error code system
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
a2b0f8b803 lib: Convert stream.c to use new error code subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
4496fbb36c lib: Convert sockopt.c to flog_err
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
1b5e2f895a lib: Convert sockunion.c to use flog_err
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
decbd92979 lib: Update zclient.c warn code
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
29c7044c63 lib: Convert to errors some issues in buffer.c
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
ffd9ac069c lib: Convert to flog_warn in agentx.c
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
78cb655568 bgpd: Update bgp_updgrp_packet.c to use flog_warn
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
065eaa3629 bgpd: Convert bgp_open.c to use flog_warn
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
f162a5b977 bgpd: convert bgp_nht.c to use flog_warn
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
01c4f23c0e bgpd: Modify bgp_label to use flog_warn
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
286425133e bgpd: Convert bgp_evpn.c to use flow_warn
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
28f22e266f bgpd: Convert bgp_network.c to use flog_warn
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
63d430ceee bgpd: Convert zlog_warn to flog_warn for bgp_packet.c
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
7077f45c69 bgpd: Convert bgp_dump.c to use flog_warn
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Donald Sharp
559aaa3066 bgpd: Convert zlog_warn to flog_warn for bgp_aspath.c and bgp_attr.c
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Quentin Young
2311712a62 lib: add flog_warn
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-09-06 20:50:58 +00:00
Renato Westphal
ccf811a32b
Merge pull request #2984 from donaldsharp/ak503_eigrp
eigrp: opnional metric in 'no redistribute'
2018-09-06 13:51:40 -03:00
Renato Westphal
f9ecc65d03
Merge pull request #2974 from donaldsharp/v4_and_v6
V4 and v6
2018-09-06 12:33:26 -03:00
dturlupov
1a5cad2e9a eigrp: opnional metric in 'no redistribute'
Signed-off-by: Dmitrii Turlupov <dturlupov@factor-rs.ru>
2018-09-06 06:14:51 -04:00
Biswajit Sadhu
6e23e5e9e1 lib: Ensure FRR detects running of the second instance of a FRR daemon, doesnot allow it to run.
Solution :
The following procedures would be performed :

1. Verify if the pid file for each daemon is present or not. If the file is not present, that means the
   daemon is getting instantiated for the first time. So let it go ahead.
   If the file is present proceed to point ‘2’.

2. Try fetching the properties of the pid file.

3. If it has RW lock, that means one instance of this the daemon is already running.
   So stop moving ahead and do exit() else let it go ahead.
Please note all above procedure happen at
   the initial state of daemon’s instantiation, much before it starts any session with other
   process/allocates resources etc.. and this verification do not have any impact of any
   operations done later, if the verification succeeds.

Signed-off-by: bisdhdh sadhub@vmware.com
2018-09-06 02:51:40 -07:00
Thibaut Collet
c3568c4d1a zebra/lib: code cleaning
Remove useless parenthesis and explicit cast.
Remove redundant code.

Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
2018-09-06 07:48:12 +02:00
Donald Sharp
fa83edf08b doc: Update sharp documentation
Update the sharp documentation to note v6 nexthops are able
to be installed now.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-05 21:03:58 -04:00
Donald Sharp
ba041beaae sharpd: Modify route install to allow v6 nexthops
Allow the user to create a v4 route with a v6 nexthop.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-05 21:03:58 -04:00
Donald Sharp
2d68a0f2da zebra: Fix _route_entry_dump to handle nexthop family as appropriate
The _route_entry_dump function was not handling the nexthop as passed
in from an upper level protocol appropriate and as such not displaying
the v4/v6 nexthop right in the case where we have both going.

Additionally dump the nexthop vrf as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-05 21:02:18 -04:00
Donald Sharp
98ea5be8b3 lib: Add missing smux.h to make distrib results
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-05 20:58:50 -04:00
Donald Sharp
c279fc5fdd
Merge pull request #2959 from opensourcerouting/bfd-cleanup
bfdd: code clean up
2018-09-05 19:54:35 -04:00
Russ White
7f0f6e7b75
Merge pull request #2873 from vivek-cumulus/evpn-extended-mobility
EVPN extended mobility support
2018-09-05 18:09:31 -04:00
Donald Sharp
2acc231024 zebra: Fix RB-Tree storage comparison function for v6
The RB-Tree used to store rmac information was not properly
handling the v6 address family.  Modify the code to allow
this handling.

Cleans up this error message:

zebra[2231]: host_rb_entry_compare: Unexpected family type: 10

That is being seen, This fixes some connectivity issues being seen.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-05 17:04:35 -04:00
Rafael Zalamena
9835f17d33 bfdd: fix crash when receiving invalid echo packet
The log function would improperly format a string using an integer
causing a crash. This situation was found when switching echo mode with
a active connection.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-09-05 12:29:14 -03:00
Rafael Zalamena
8529e18048 bfdd: use THREAD_OFF() instead of thread_cancel()
Use a standardized function to cancel threads instead of hand rolling
our own.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-09-05 12:27:52 -03:00
Russ White
fc449ff00d
Merge pull request #2970 from dslicenc/more-bool-use-json
bgpd, ospfd, pimd, zebra: Convert more use_json locations to bool
2018-09-05 10:38:11 -04:00
Christian Franke
f3c7b99d05 doc: add documentation for fabricd
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:41:47 +02:00
Christian Franke
f6ae63ca95 isisd: fix warnings by removing union isis_N and going to void * instead
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:13 +02:00
Christian Franke
4141588823 fabricd: add support for completely unnumbered operation
With this commit, fabricd can run without any IPv4 addresses configured
except on loopback. There are two changes to achieve this:

a) If a circuit has no IPv4 address configured, fabricd will resort to
advertise the routers loopback IP in the OpenFabric hellos.

b) All the routes from OpenFabric are sent with ZEBRA_FLAG_ONLINK set,
so that zebra will install them into the fib without checking whether
the nexthop is reachable

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:13 +02:00
Christian Franke
103e4a718f zebra: add a ZEBRA_FLAG_ONLINK so that routes bypass the is-unnumbered check
For OpenFabric operation, we need to be able to install routes via
interfaces without any IPv4 addresses configured. Introduce a flag
ZEBRA_FLAG_ONLINK which upper protocols can set on a route they send
towards zebra, to force the nexthops to be considered onlink.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:13 +02:00
Christian Franke
df0ba689eb fabricd: trigger CSNP after flooding scope LSP has been received
Have fabricd send out a CSNP whenever a circuit scoped LSP is received,
and log a warning if the CSNP showed resynchronization was necessary.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:13 +02:00
Christian Franke
a2d41bb0ee fabricd: Remove processing for unneded PDUs and TLVs
The OpenFabric draft prescribes that any IS-IS PDUs not needed for
OpenFabric operation MUST be ignored. So this commit makes fabricd
ignore any LAN IIHs and any L1 LSPs.

Also the draft specifies that any reachabilities given as narrow-metric
TLVs SHALL be ignored, so adhere to that too.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:13 +02:00