Commit Graph

11935 Commits

Author SHA1 Message Date
Quentin Young
76015847ea vtysh: rewrap comments
fixup comments for vtysh

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-22 21:14:00 +00:00
Renato Westphal
5f8247153b
Merge pull request #2280 from qlyoung/docuser
doc: move -r option docs to zebra only
2018-05-22 15:52:27 -03:00
Donald Sharp
b861cb7d2f
Merge pull request #2277 from pguibert6WIND/fix_case_zclient_broken
zebra: upon zclient breaking, flush PBR entries
2018-05-22 14:44:31 -04:00
Quentin Young
da7e1a9212 doc: move -r option docs to zebra only
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-22 17:55:20 +00:00
Donald Sharp
bb98075ed9
Merge pull request #2268 from opensourcerouting/rpki-spec-fix
redhat: Fix RPKI RPM build option (Master Branch)
2018-05-22 13:11:21 -04:00
Renato Westphal
92367796d2
Merge pull request #2273 from qlyoung/remove-retain-mode
*: remove -r from daemons except zebra
2018-05-22 12:49:24 -03:00
Philippe Guibert
4c0ec639fd zebra: upon zclient breaking, flush PBR entries
In case, the BGP or PBR daemon leaves, the PBR contexts created by this
daemon are flushed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-05-22 17:41:27 +02:00
Lou Berger
70b2080ccf
Merge pull request #2257 from donaldsharp/evpn_fixes
bgpd: Lock the parent rn as well
2018-05-22 11:33:01 -04:00
Quentin Young
06081c784f
Merge pull request #2220 from LabNConsulting/working/master/fix-asan
*: fix compile with -enable-address-sanitizer configured
2018-05-22 11:15:28 -04:00
Donald Sharp
5d9cbca226 bgpd: Ensure virt->vrfs is valid
Move the list_delete_and_null of the virt->vrfs code to
the actual deletion function to ensure proper lifecycle.
This assumption allows us to know that irt->vrfs is always
true so remove the NULL check on it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-22 10:54:20 -04:00
Donald Sharp
b1ab0dfe20 bgpd: Free vni list on actual deletion
The irt->vnis list was being freed on going down,
but actually delete it from the deletion function.  Then
we can know that the irt->vnis is a valid list anywhere
we have a irt pointer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-22 10:50:53 -04:00
Donald Sharp
f9a789103f bgpd: Ensure we don't dereference a non-valid pointer
The attr->ecommunity may be null coming into the function
at this point.  Ensure that it is.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-22 10:44:32 -04:00
Donald Sharp
ba1976dbf8 bgpd: Fix use of uninitialized variable
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-22 09:53:01 -04:00
Renato Westphal
b16c827adf
Merge pull request #2262 from donaldsharp/v6_replace_semantics
V6 replace semantics
2018-05-22 09:05:06 -03:00
Quentin Young
c8dde10f58 *: remove -r from daemons except zebra
This option is only implemented by 4 daemons:
- BGPD
- RIPD
- RIPNGD
- Zebra

Manpages and documentation say that the option causes routes to not be
uninstalled from zebra when the daemon terminates. This is true for RIPD
and RIPNGD. This is not true for BGPD; in that daemon it only prevents
transmission of Cease / Peer Unconfig NOTIFICATION messages to peers.

Moreover, when any daemon disconnects from Zebra, all of its routes are
uninstalled from Zebra and the kernel regardless of this option,
rendering the option largely vestigial.

It is still useful in Zebra, where it prevents all routes from being
uninstalled when Zebra shuts down, so it is left there.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-21 19:09:49 +00:00
Mladen Sablic
67736451c5 vtysh: reconnect to daemons when connection lost
Functionality to let vtysh attempt to reconnect to daemons when
connection is lost (e.g. crash or restart).

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2018-05-21 20:51:03 +02:00
Chirag Shah
6f19bb0ee7 ospf6d: Fix inter area prefix
Inter Area Prefix LSA ECMP is not working properly.
Two ABRs advertising IAP routes to backbone, not installed
with correct cost or if ABR restarted the route is removed
from backbone.
The current implementation ABR was not suppressing IAP update
for prefix cost is not better or route is not installed.
The better cost or path route was overwritten with non optimal
cost. This caused a loop with nexthops pointing each other
at backbone and non-backbone routers.

Consider to only send BEST/installed route's IAP notification
at ABRs.
When receiving IAP update from multiple ABRs, preserve multiple
advertising routers under the prefix route node.
Upon LSA maxage only remove the advertising route's which is
impacted and update route's nexthops and update FIB.

Testing Done:
Top to Bottom is part of area 0 on the Right, and
from Left side in area 1.
Top and Bottom act as ABRs.
H1 route is sent as Inter-Area Prefix to Right.
Trigger multiple triggers for ABR routes.
1) Shutting down link between, top to right to eliminate nhs
2) Restart frr at Top.
3) Restart frr at Right.

                                     +-----------+
                                     .           |
                                   ,'|   Top     |`.
                                  /  .           |  \
                                ,' ,'+.----------+`. `.
                               /  /  `          `.  \  ',
                             ,' ,' ,'             \  `.  .
                            -  /  `                `.  ', `,
                          ,` ,` ,'                   \   \  \
                         '  -  `                      `.  `, `,
       +--------+    +--`--`--`--+                  +---'---'--'+    +--------+
       |        |    |           |                  |           |    |        |
       |    H1  ------  Left     |                  |   Right   ------   H2   |
       |        |    |           |                  |           |    |        |
       +--------+    +-----------+                  +----.--,-,-+    +--------+
                        `.  `   \                       -  / /
                          \  `.  `                    ,' .` `
                           '   .  \                  /  /  '
                            `.  \  `.               `  / ,'
                              \  `   .            ,`  / /
                               `. `.  .          /   / /
                                 \  .  \       ,'   ' /
                                  '  '--'--------+,'.`
                                   `.|           - /
                                     '  mid1     |/
                                     |           -
                                     +-----------+

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-05-21 07:29:21 -07:00
Renato Westphal
ba6ccc944f
Merge pull request #2267 from donaldsharp/flim_flam
zebra: Cleanup some nits from Review Comments
2018-05-21 09:49:45 -03:00
Donald Sharp
85442b0959 zebra: Cleanup some nits from Review Comments
1) Small formating mistake fixed
2) Rename of a variable to give it a slightly better name

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-21 07:18:18 -04:00
Philippe Guibert
abceee4119
Merge pull request #2256 from donaldsharp/zebra_vxlan_flim_flam
Zebra performance improvements at scale for vxlan code
2018-05-21 09:10:21 +02:00
Martin Winter
b4c554e24f redhat: Fix RPKI RPM build option
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-05-20 07:13:02 -07:00
Rafael Zalamena
a44ed5bd8c
Merge pull request #2260 from qlyoung/fix-docs-distclean
doc: fix distclean
2018-05-19 22:30:18 -03:00
Renato Westphal
72a8513e64
Merge pull request #2261 from qlyoung/fix-missing-doc
Fix missing dist files
2018-05-19 10:30:32 -03:00
Pascal Mathis
47cbc09b63
bgpd: Move 'enforce-first-as' from global to peer
This commit moves the command 'bgp enforce-first-as' from global BGP
instance configuration to peer/neighbor configuration, which can now be
changed by executing '[no] neighbor <neighbor> enforce-first-as'.

End users can now enforce sane first-AS checking on regular sessions
while e.g. disabling the checks on routeserver sessions, which usually
strip away their own AS number from the path.

To ensure backwards-compatibility, a migration routine was added which
automatically sets the 'enforce-first-as' flag on all configured
neighbors if the old global setting was activated. The old global
command immediately disappears after running the migration routine once.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
2018-05-19 14:43:42 +02:00
Donald Sharp
7c82b3120e bgpd: Fix crash on shutdown
There exists code paths where the rn was being used after free.
This eliminates these code paths.

Fixes: CM-21019
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-18 20:40:24 -04:00
Donald Sharp
4354d381a6 doc: Add --v6-rr-semantics option to zebra doc
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-18 15:46:56 -04:00
Quentin Young
ecbe4344af tests: add missing file to Makefile.am
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-18 19:45:10 +00:00
Quentin Young
037089f83b doc: add missing file to Makefile.am
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-18 19:44:58 +00:00
Donald Sharp
6b093863ec zebra: Allow runtime determination of v6 RR semantics
The linux kernel is getting the same Route Replace semantics
for v6 that v4 uses.  Allow the end-user to know if their
kernel has this ability and if so to specify it so zebra
can take advantage of this.

Why not do auto-detection?  Because you would have to write
code in zebra to add a route then add the same route again
with different nexthops to see if which semantics it is using.
It sure is easier to just add a cli that allows the user to
do it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-18 15:42:17 -04:00
Quentin Young
9eb51ce361 doc: fix distclean
Apparently Automake has some undocumented logic somewhere that makes it
so any Makefile generated from an Automake Makefile.am is removed from
its secret list of things to delete that it deletes when performing a
recursive distclean before actually performing the recursive distclean
and since the secret list is automatically generated from the list of
things that Autoconf should generate in configure.ac we can't remove the
Makefile from that list or it will break Automake's list of things to
automatically generate that it generates from Autoconf's list of things
to automatically generate.

Thus, to prevent Automake from deleting Makefiles and then immediately
trying to use the Makefiles it just deleted to delete said Makefiles, we
must remove ourselves from the secret list, which is accomplished by
changing the file extension to '.am' instead of '.in'.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-18 19:35:24 +00:00
Donald Sharp
29be7d92cc
Merge pull request #2198 from LabNConsulting/working/master/bgpd-nht-crash
bgpd: fix NHT free when nht_info is null (fixes crash)
2018-05-18 07:51:06 -04:00
Russ White
1cbbd4950b
Merge pull request #2231 from ppmathis/fix/clear-bgp-afi
bgpd: Respect AFI/SAFI when hard-clearing a peer
2018-05-18 02:48:59 -04:00
Russ White
4ae3a2de37
Merge pull request #2252 from donaldsharp/instance_rm_match
Instance routemap match
2018-05-18 02:41:23 -04:00
Russ White
eeb1b4ed89
Merge pull request #2253 from chiragshah6/ospfv3_dev
ospf6d: Fix ECMP for asbr external routes
2018-05-18 02:39:28 -04:00
Russ White
c66932f7e7
Merge pull request #2255 from donaldsharp/rt_netlink_dirty_bits
Some Valgrind issues found
2018-05-18 02:37:54 -04:00
Donald Sharp
987d819873 bgpd: Clean up some evpn memory leaks
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-17 18:54:25 -04:00
Donald Sharp
5605ecfc1f zebra: memset buf to prevent uninited writes into kernel
Setup the buf used for extra data passed into kernel such
that we are cleaning it out before writing data to it,
so we can avoid writing uninited data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-17 18:46:14 -04:00
Chirag Shah
804a329410 ospf6d: Fix ECMP for asbr external routes
Use brouter table to fetch nexthops for
asbr prefix (external) routes.
Change adv. router of the router's path once
the DB/FIB is updated with effective nexthops.
Cleanup of nexthop update when route's adv
router changes cost.

Ticket:CM-16139
Testing Done:
Tested ASBR external routes in CLOS topology with
multiple paths asbr originator at tor to spine.
Validated external route's nexthop within
area and inter area.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-05-17 11:10:09 -07:00
Quentin Young
21c84871cf
Merge pull request #2221 from rodnymolina/vtysh_extension
vtysh: Extending vtysh to allow question-mark cmds
2018-05-17 13:03:11 -04:00
Donald Sharp
af21c68244 doc: Add some doc for source-instance
Add the documentation for match source-instance.
I also noticed that 'match source-protocol' was missing
add that in too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-17 11:05:08 -04:00
Donald Sharp
ae252c027f sharp: Allow the specification of instance when adding/deleting routes
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-17 10:59:17 -04:00
Donald Sharp
808afce955 sharpd: Add some ability to ignore route-map commands
Add some ability for sharpd to ignore the route-map commands
when using a integrated config.

signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-17 10:59:17 -04:00
Donald Sharp
3b83faf238 zebra: Add sharp to protocols that you can match source-protocol on
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-17 10:59:17 -04:00
Donald Sharp
633a66a586 zebra: Add 'match source-instance' to allow finer grained control
Add to zebra route-maps the ability to match on a source-instance

route-map FOO deny 55
 match source-instance 5
route-map FOO permit 60

ip protocol any route-map FOO

This will match any protocol route installation with a source-instance of 5.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-17 10:57:59 -04:00
Donald Sharp
f2a503f0ce zebra: The neigh host_list is expensive too
The neighbor host_list is expensive as well.  Modify
the code to take advantage of a rb_tree as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-17 08:28:33 -04:00
Donald Sharp
41db76c235 zebra: Rename some functions to allow reuse
We are going to modify more host_list's to host_rb's
so let's rename some functions to take advantage of
what is there.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-17 08:10:41 -04:00
Donald Sharp
5e1b0650de zebra: Convert zrmac->host_list list to a RB Tree
The host_list when we attempt to use it at scale, ends
up spending a non-trivial amount of time finding and
sorting entries for the host list.  Convert to a rb tree.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-17 08:01:24 -04:00
Rafael Zalamena
7bed0c42d5
Merge pull request #2200 from qlyoung/docuser-gettingstarted
doc: add "Getting Started" section
2018-05-16 18:24:36 -03:00
Lou Berger
cb0fd829f3
Merge pull request #2247 from donaldsharp/sa_sa_sa
3 SA issues fixed.
2018-05-16 16:59:50 -04:00
Quentin Young
3a7177f0fe doc: remove notes about ipv6 packages
Kernel 2.2 was released in 1999, I'm pretty sure everybody has it by
now. Plus these links don't even exist anymore.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-16 20:24:19 +00:00