Commit Graph

11935 Commits

Author SHA1 Message Date
Quentin Young
8957c78a9e doc: document 'show cli graph'
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-06-04 20:20:31 +00:00
Donald Sharp
10ac25160c zebra: Fix memory leak on host prefix removal
When we have a host prefix, actually free the alloced memory
associated with it when we free it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-04 13:31:34 -04:00
Donald Sharp
7acf817f46
Merge pull request #1976 from pguibert6WIND/issue_1968
Issue 1968 / ip route <> table X
2018-06-04 09:36:01 -04:00
Donald Sharp
3b7268448f
Merge pull request #2259 from ppmathis/enhancement/peer-enforce-first-as
bgpd: Move 'enforce-first-as' from global to peer
2018-06-04 09:35:00 -04:00
Donald Sharp
dc8daeadaa
Merge pull request #2355 from opensourcerouting/fix-build-freebsd-snmp
build: append -std=gnu99 after SNMP_CFLAGS
2018-06-04 08:36:02 -04:00
Donald Sharp
5b3ef5094c
Merge pull request #2356 from opensourcerouting/doc-ldpd-rfcs
doc: list RFCs supported by ldpd in overview.rst
2018-06-04 08:35:03 -04:00
Martin Buck
5271457d94 pimd: Fix debug messages
Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
2018-06-04 14:27:48 +02:00
Donald Sharp
38bbad1bef zebra: Add some vrf information to debug messages
When debugging code in redistribute.c, it is useful to output
the vrf we think the interface is in.  So display it
when we are debugging.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-04 13:17:38 +02:00
Donald Sharp
d12b745c90 bgpd: Actually release peer from bgp_peer hash
When we are determining the state of a peer, we sometimes
detect that we should update the peer->su.  The bgp->peer_hash
keeps a hash of peers based upon the peer->su.  This requires
us to release the stored value before we re-insert it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-04 13:16:29 +02:00
Lou Berger
3ad00234f7 bgpd: open per vrf listen socket for linux type vrfs
Signed-off-by: Lou Berger <lberger@labn.net>
2018-06-04 13:13:15 +02:00
Lou Berger
c9c70dd164 lib: fix setsockopt arg
Signed-off-by: Lou Berger <lberger@labn.net>
2018-06-04 13:13:15 +02:00
Renato Westphal
401c174473 doc: list RFCs supported by ldpd in overview.rst
This is only a minor step in the direction of actually writing
documentation for ldpd...

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-06-02 22:36:10 -03:00
Renato Westphal
7aad159464 build: append -std=gnu99 after SNMP_CFLAGS
Programs that link to libnetsnmp must be compiled using a special set
of flags as specified by the "net-snmp-config --base-cflags" command
(whose output is stored in the SNMP_CFLAGS variable). The problem is
that "net-snmp-config --base-cflags" can output -std=c99 in addition to
other compiler flags in some platforms, and this breaks the build since
FRR souce code makes use of some GNU compiler extensions (e.g. allow
trailing commas in function parameter lists). In order to solve this
problem, append -std=gnu99 after SNMP_CFLAGS in all makefiles where this
variable is used. This way the -std=c99 flag will be overwritten when it's
present. Source files that don't link to libnetsnmp will be compiled using
either -std=gnu99 or -std=gnu11 depending on the compiler availability.

Fixes #1617.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-06-02 22:12:57 -03:00
Russ White
ebb46153b0
Merge pull request #2245 from donaldsharp/type_4
Support EVPN Type 4 Routes
2018-06-01 16:00:14 -04:00
Quentin Young
acf59d7a87 vtysh: fix potential stack buffer overflow
If vtysh was instructed to perform line-by-line processing on the output
of a command executed against a daemon and this output, as received by
vtysh, was not terminated with a newline, vtysh could print contents of
memory to its output device.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-06-01 19:25:03 +00:00
Donald Sharp
ad0b64d18d bgpd: Note deprecation in documentation
Note that these commands:

bgp config-type cisco
no bgp multiple-instance

are now deprecated and will be removed in a future version of FRR.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-01 15:15:30 -04:00
Donald Sharp
1cc406605b bgpd: Deprecate and hide the no bgp multiple-instance command
This command needs to be deprecated.  It partially implements
a refusal to create multiple instances.  If you do not need
multiple instances, just don't create them in the cli instead.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-01 15:15:30 -04:00
Donald Sharp
798467a200 bgpd: Hide and deprecate bgp config-type cisco command
This command needs to be deprecated.  It sets a small variety
of options via the BGP_OPT_CONFIG_CISCO flag.  Set for removal
in 1 year.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-06-01 15:15:30 -04:00
Quentin Young
65757481f0
Merge pull request #2329 from pguibert6WIND/issue_2275_proposal
doc: inform the diff between config from zebra and outside
2018-06-01 12:39:20 -04:00
Olivier Dugeon
4adca4ef16
Merge pull request #2309 from opensourcerouting/master-mpls_te_print_detail-fix
isisd: fix mpls_te_print_detail to not read out-of-bounds
2018-06-01 16:32:15 +02:00
Philippe Guibert
00384b5fbd zebra: keep one command to handle vty with/without table param
That fix is a workaround from a vtysh limitation.
Because table identifier should be accessible in configuration only for
vrf netns backends, there was a need to differentiate the vty commands.
Unfortunately, vtysh parses the two commands without knowing which
command has really been installed.
Using one single vty command will avoid having this issue in vtysh.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-06-01 15:24:13 +02:00
Philippe Guibert
b73823efa1 zebra: add in show vrf information about vrf backend kind
By default, nothing is displayed. If vrf backend is linux network
namespaces, then "netns-based vrfs" is displayed, before dumping the
list of VRFs.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-06-01 15:24:13 +02:00
Philippe Guibert
87d6ac7a04 zebra: add show ip route table vrf command
It is possible to get table per VRF, provided that vrf backend is
configured with NETNS.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-06-01 15:24:13 +02:00
Philippe Guibert
b3441a6a22 zebra: ns_table list is extended to support multiple NETNS
In the case where vrf backend is netns, then the list of ns tables may
be extended. A single list is kept,but an attribute is added: the ns_id.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-06-01 15:24:13 +02:00
Philippe Guibert
e9748a8901 zebra: table_id election with the vrf backend
As table_id for VRF with netns backend is main table ( RT_TABLE_MAIN or
zebrad.rtm_table_default), this makes possible to return the table id
that wants to be configured for those cases. ( in addition to default
VRF). In other cases ( VRF Lite presumably), then vrf table_id is
returned.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-06-01 15:24:13 +02:00
Philippe Guibert
b3b086026b zebra: add table keyword to route configuration vty command
Add the table keyword for all ip route/ip mroute/ipv6 route commands
that are available. Also, the main structure is being added a table
identifier.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-06-01 15:24:13 +02:00
Philippe Guibert
d66a93dd93 doc: replace 'intact' keyword with something more clear
Keeping the config intact might be misunderstood. I say that even if VRF
netns is automatically discovered, it is possible for administrator to
save the netns information in the config file, to bring more clarity (
hence the config commands available).

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-06-01 13:18:35 +02:00
Philippe Guibert
4d25da4f1e doc: inform the diff between config from zebra and outside
To avoid some confusions, it is precised in the documentation that
the configuration not done from zebra will not be injected in the
configuration context. As consequence, the config file will not be
impacted by underlying network context. But also, this will not be
possible for *Zebra* to attempt to modify outside networking objects.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-06-01 13:18:31 +02:00
Martin Winter
ef319aa3d7
Merge pull request #2324 from qlyoung/docuser
doc: cleanup sharp.rst
2018-06-01 03:01:09 +02:00
Martin Winter
a7361d4fe9
Merge pull request #2250 from donaldsharp/watchfrr
redhat: Make watchfrr the default
2018-06-01 01:20:26 +02:00
Renato Westphal
954b112276
Merge pull request #2332 from donaldsharp/sa_42
Sa 42
2018-05-31 12:10:35 -03:00
Renato Westphal
d8f638e09a
Merge pull request #2325 from donaldsharp/aggregate
bgpd: Add null0 route back for aggregate-address route created.
2018-05-31 12:05:48 -03:00
Donald Sharp
829e590b58 bgpd: Cleanup leaked ecommunity on shutdown
Cleanup the leaked ecommunity data that we may have on shutdown.
Cleanup leaked vrf name strings on shutdown.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-31 09:43:07 -04:00
Donald Sharp
21d88ef761 bgpd: Lock originating bgp pointer for vrf route leaking
There exists cases where we will attempt to hard delete
the bgp instance( say a `no router bgp` is issued )
when we have vrf route leaking.  If we do have this
lock the bgp instance of the originator and do not
let it be deleted out from under us until we are
finished processing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-31 09:43:07 -04:00
Donald Sharp
122eebd85a bgpd: Fix memory use after free
We were immediately using memory after it was freed.  Fix.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-31 09:43:07 -04:00
Donald Sharp
3292693b2f bgpd: Cleanup leaked memory on shutdown
When we are shutting down, there exists a code path
where the connected table leaks some memory.  Cleanup
the code to remove the memory.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-31 09:43:07 -04:00
Donald Sharp
f220da9968 bgpd: Fix SA issue with uninited ifindex value
The rearrangement of where the decision point of
filling in the aggregate information, must have allowed
SA to find a path of code where we may use ifindex uninitialized.
While I don't think this is possible to happen, make this issue
go away.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-31 09:37:34 -04:00
Christian Franke
27a470dc27 isisd: fix mpls_te_print_detail to not read out-of-bounds 2018-05-31 12:52:29 +02:00
Donald Sharp
f6bdc08004 bgpd: Cleanup some duplicated code
We have 2 code paths that were duplicating a bunch of code
for the deletion of connected prefixes.

This simplifies the code path and makes the code look a bit
cleaner.

I did not touch the _add path because the v4 if statement
had some code I did not have time to look into.  Future project.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30 17:47:48 -04:00
Donald Sharp
24f8bd87e5 bgpd: Ignore return code for str2prefix
The call to str2prefix_rd when we get to this point of the
code cannot fail.  As such let's just ignore the return code.

Found by Coverity SA.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30 09:50:22 -04:00
Donald Sharp
c37e1f598b pimd: hash_get w/ hash_alloc_intern cannot fail
The assignment of sa with the usage of hash_get and hash_alloc_intern
can never fail.  No need to look for a failure case.

Found by Coverity SA.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30 09:42:24 -04:00
Donald Sharp
a9bafa95d0 bgpd: Notice when peer_clear fails
Issue Found by Coverity Scan.  When we call peer_clear we
are checking the return code in every other call.  Add
a bit of extra code to notice the failure and note it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30 09:37:03 -04:00
Donald Sharp
9588ae79fa bgpd: Fix redundant or test
The if statement had a second instance of the same variable
to test as part of the statement.

Found by SA.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30 09:32:33 -04:00
Philippe Guibert
a35947d06b doc: add BGP VRF use case
This commit brings some information about BGP VRF case with peering
using multiple VRF instances.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-05-30 15:15:25 +02:00
Donald Sharp
7c5d0e1853 zebra: Add enum dp_req_result to lsp install/deletes
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30 08:05:29 -04:00
Donald Sharp
ebecd64913 zebra: Add knowledge of request success/failure for pbr rules
Add some nascent code to handle success/failure of the rule
installation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30 08:05:28 -04:00
Donald Sharp
1e88567226 zebra: Add a result from dataplane request
Add a bit of code to allow return of data plane
request messages.

Add the ability to pass the result back to callers
of kernel_route_rib.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30 08:03:13 -04:00
Donald Sharp
215181cbf1 zebra: Rename SOUTHBOUND_XXX to DP_XXX
The SOUTHBOUND_XXX enum was named a bit poorly.
Let's use a bit better name for what we are trying to do.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30 08:00:55 -04:00
Donald Sharp
5b7077e892 redhat: Fix old systems on upgrade path
Fix old systems in upgrade path to enable watchfrr when upgrading.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30 07:53:28 -04:00
Donald Sharp
b13124f0f7 redhat: Make watchfrr the default
With systemd being the default on more systems now, lets
configure watchfrr to start else systemd systems on
redhat will not stay up for more than 1 minute.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-30 07:52:23 -04:00