]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agobgpd: withdraw fib entry on appropriate table identifier
Philippe Guibert [Tue, 9 Jul 2019 08:59:14 +0000 (10:59 +0200)]
bgpd: withdraw fib entry on appropriate table identifier

There are cases where the table identifier is set on a bgp entry, mainly
due to route-map, and associate fib entry needs to be removed.
This change encompasses also the route-map reconfiguration that leads to
removing the previous entry, whereas bgp update had been triggered (
this happens when software inbound reconfiguration is handled).

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agobgpd: ability to export prefixes entries to a kernel table identifier
Philippe Guibert [Mon, 29 Apr 2019 13:26:01 +0000 (15:26 +0200)]
bgpd: ability to export prefixes entries to a kernel table identifier

this table identifier can be used for policy routing. incoming entries
are locally exported to that local table identifier.
note that so that the user applies the new table identifier to all
entries, the user should flush local tables first.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agolib: Fix read beyond end of data structure
Donald Sharp [Thu, 10 Oct 2019 12:52:54 +0000 (08:52 -0400)]
lib: Fix read beyond end of data structure

Our Address Sanitizer CI is finding this issue:
error 09-Oct-2019 19:28:33 r4: bgpd triggered an exception by AddressSanitizer
error 09-Oct-2019 19:28:33 ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffdd425b060 at pc 0x00000068575f bp 0x7ffdd4258550 sp 0x7ffdd4258540
error 09-Oct-2019 19:28:33 READ of size 1 at 0x7ffdd425b060 thread T0
error 09-Oct-2019 19:28:33     #0 0x68575e in prefix_cmp lib/prefix.c:776
error 09-Oct-2019 19:28:33     #1 0x5889f5 in rfapiItBiIndexSearch bgpd/rfapi/rfapi_import.c:2230
error 09-Oct-2019 19:28:33     #2 0x5889f5 in rfapiBgpInfoFilteredImportVPN bgpd/rfapi/rfapi_import.c:3520
error 09-Oct-2019 19:28:33     #3 0x58b909 in rfapiProcessWithdraw bgpd/rfapi/rfapi_import.c:4071
error 09-Oct-2019 19:28:33     #4 0x4c459b in bgp_withdraw bgpd/bgp_route.c:3736
error 09-Oct-2019 19:28:33     #5 0x484122 in bgp_nlri_parse_vpn bgpd/bgp_mplsvpn.c:237
error 09-Oct-2019 19:28:33     #6 0x497f52 in bgp_nlri_parse bgpd/bgp_packet.c:315
error 09-Oct-2019 19:28:33     #7 0x49d06d in bgp_update_receive bgpd/bgp_packet.c:1598
error 09-Oct-2019 19:28:33     #8 0x49d06d in bgp_process_packet bgpd/bgp_packet.c:2274
error 09-Oct-2019 19:28:33     #9 0x6b9f54 in thread_call lib/thread.c:1531
error 09-Oct-2019 19:28:33     #10 0x657037 in frr_run lib/libfrr.c:1052
error 09-Oct-2019 19:28:33     #11 0x42d268 in main bgpd/bgp_main.c:486
error 09-Oct-2019 19:28:33     #12 0x7f806032482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
error 09-Oct-2019 19:28:33     #13 0x42bcc8 in _start (/usr/lib/frr/bgpd+0x42bcc8)
error 09-Oct-2019 19:28:33
error 09-Oct-2019 19:28:33 Address 0x7ffdd425b060 is located in stack of thread T0 at offset 240 in frame
error 09-Oct-2019 19:28:33     #0 0x483945 in bgp_nlri_parse_vpn bgpd/bgp_mplsvpn.c:103
error 09-Oct-2019 19:28:33
error 09-Oct-2019 19:28:33   This frame has 5 object(s):
error 09-Oct-2019 19:28:33     [32, 36) 'label'
error 09-Oct-2019 19:28:33     [96, 108) 'rd_as'
error 09-Oct-2019 19:28:33     [160, 172) 'rd_ip'
error 09-Oct-2019 19:28:33     [224, 240) 'prd' <== Memory access at offset 240 overflows this variable
error 09-Oct-2019 19:28:33     [288, 336) 'p'
error 09-Oct-2019 19:28:33 HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
error 09-Oct-2019 19:28:33       (longjmp and C++ exceptions *are* supported)
error 09-Oct-2019 19:28:33 SUMMARY: AddressSanitizer: stack-buffer-overflow lib/prefix.c:776 prefix_cmp
error 09-Oct-2019 19:28:33 Shadow bytes around the buggy address:
error 09-Oct-2019 19:28:33   0x10003a8435b0: 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00
error 09-Oct-2019 19:28:33   0x10003a8435c0: 00 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3 f3 f3
error 09-Oct-2019 19:28:33   0x10003a8435d0: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00
error 09-Oct-2019 19:28:33   0x10003a8435e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
error 09-Oct-2019 19:28:33   0x10003a8435f0: f1 f1 04 f4 f4 f4 f2 f2 f2 f2 00 04 f4 f4 f2 f2
error 09-Oct-2019 19:28:33 =>0x10003a843600: f2 f2 00 04 f4 f4 f2 f2 f2 f2 00 00[f4]f4 f2 f2
error 09-Oct-2019 19:28:33   0x10003a843610: f2 f2 00 00 00 00 00 00 f4 f4 f3 f3 f3 f3 00 00
error 09-Oct-2019 19:28:33   0x10003a843620: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
error 09-Oct-2019 19:28:33   0x10003a843630: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 02 f4
error 09-Oct-2019 19:28:33   0x10003a843640: f4 f4 f2 f2 f2 f2 04 f4 f4 f4 f2 f2 f2 f2 00 00
error 09-Oct-2019 19:28:33   0x10003a843650: f4 f4 f2 f2 f2 f2 00 00 00 00 f2 f2 f2 f2 00 00
error 09-Oct-2019 19:28:33 Shadow byte legend (one shadow byte represents 8 application bytes):
error 09-Oct-2019 19:28:33   Addressable:           00
error 09-Oct-2019 19:28:33   Partially addressable: 01 02 03 04 05 06 07
error 09-Oct-2019 19:28:33   Heap left redzone:       fa
error 09-Oct-2019 19:28:33   Heap right redzone:      fb
error 09-Oct-2019 19:28:33   Freed heap region:       fd
error 09-Oct-2019 19:28:33   Stack left redzone:      f1
error 09-Oct-2019 19:28:33   Stack mid redzone:       f2
error 09-Oct-2019 19:28:33   Stack right redzone:     f3
error 09-Oct-2019 19:28:33   Stack partial redzone:   f4
error 09-Oct-2019 19:28:33   Stack after return:      f5
error 09-Oct-2019 19:28:33   Stack use after scope:   f8
error 09-Oct-2019 19:28:33   Global redzone:          f9
error 09-Oct-2019 19:28:33   Global init order:       f6
error 09-Oct-2019 19:28:33   Poisoned by user:        f7
error 09-Oct-2019 19:28:33   Container overflow:      fc
error 09-Oct-2019 19:28:33   Array cookie:            ac
error 09-Oct-2019 19:28:33   Intra object redzone:    bb
error 09-Oct-2019 19:28:33   ASan internal:           fe
error 09-Oct-2019 19:28:36 r3: Daemon bgpd not running

This is the result of this code pattern in rfapi/rfapi_import.c:

prefix_cmp((struct prefix *)&bpi_result->extra->vnc.import.rd,
   (struct prefix *)prd))

Effectively prd or vnc.import.rd are `struct prefix_rd` which
are being typecast to a `struct prefix`.  Not a big deal except commit
1315d74de97be2944d7b005b2f9a50e9ae5eff4d modified the prefix_cmp
function to allow for a sorted prefix_cmp.  In prefix_cmp
we were looking at the offset and shift.  In the case
of vnc we were passing a prefix length of 64 which is the exact length of
the remaining data structure for struct prefix_rd.  So we calculated
a offset of 8 and a shift of 0.  The data structures for the prefix
portion happened to be equal to 64 bits of data. So we checked that
with the memcmp got a 0 and promptly read off the end of the data
structure for the numcmp.  The fix is if shift is 0 that means thei
the memcmp has checked everything and there is nothing to do.

Please note: We will still crash if we set the prefixlen > then
~312 bits currently( ie if the prefixlen specifies a bit length
longer than the prefix length ).  I do not think there is
anything to do here( nor am I sure how to correct this either )
as that we are going to have some severe problems when we muck
up the prefixlen.

Fixes: #5025
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Ensure that struct prefix_rd rd is zero'ed out
Donald Sharp [Thu, 10 Oct 2019 12:52:13 +0000 (08:52 -0400)]
bgpd: Ensure that struct prefix_rd rd is zero'ed out

We are passing around the created rd, Just make sure that
the data is zero'ed out.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: When creating extra from stack ensure it is zero'ed out
Donald Sharp [Thu, 10 Oct 2019 00:19:56 +0000 (20:19 -0400)]
bgpd: When creating extra from stack ensure it is zero'ed out

BGP code assumes that the extra data is zero'ed out.  Ensure that we
are not leaving any situation that the data on the stack is actually all
0's when we pass it around as a pointer later.

Please note in issue #5025, Lou reported a different valgrind
issue, which is not the same issue:

==7313== Conditional jump or move depends on uninitialised value(s)
==7313== at 0x181F9F: subgroup_announce_check (bgp_route.c:1555)
==7313== by 0x1A112B: subgroup_announce_table (bgp_updgrp_adv.c:641)
==7313== by 0x1A1340: subgroup_announce_route (bgp_updgrp_adv.c:704)
==7313== by 0x1A13E3: subgroup_coalesce_timer (bgp_updgrp_adv.c:331)
==7313== by 0x4EBA615: thread_call (thread.c:1531)
==7313== by 0x4E8AC37: frr_run (libfrr.c:1052)
==7313== by 0x1429E0: main (bgp_main.c:486)
==7313==
==7313== Conditional jump or move depends on uninitialised value(s)
==7313== at 0x201C0E: rfapi_vty_out_vncinfo (rfapi_vty.c:429)
==7313== by 0x18D0D6: route_vty_out (bgp_route.c:7481)
==7313== by 0x18DD76: bgp_show_table (bgp_route.c:9365)
==7313== by 0x1930C4: bgp_show_table_rd (bgp_route.c:9471)
==7313== by 0x1932A3: bgp_show (bgp_route.c:9510)
==7313== by 0x193E68: show_ip_bgp_json (bgp_route.c:10284)
==7313== by 0x4E6D024: cmd_execute_command_real.isra.2 (command.c:1072)
==7313== by 0x4E6F51E: cmd_execute_command (command.c:1131)
==7313== by 0x4E6F686: cmd_execute (command.c:1285)
==7313== by 0x4EBF9C4: vty_command (vty.c:516)
==7313== by 0x4EBFB9F: vty_execute (vty.c:1285)
==7313== by 0x4EC250F: vtysh_read (vty.c:2119)
==7313==

that is causing the actual crash.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5129 from qlyoung/doc-yang-style
Donatas Abraitis [Thu, 10 Oct 2019 07:05:41 +0000 (10:05 +0300)]
Merge pull request #5129 from qlyoung/doc-yang-style

doc: add style guide for YANG

4 years ago*: Cleanup interface creation apis
Stephen Worley [Wed, 9 Oct 2019 23:50:13 +0000 (19:50 -0400)]
*: Cleanup interface creation apis

Cleanup the interface creation apis to make it more
clear what they are doing.

Make it explicit that the creation via name/ifindex will
only add it to the appropriate list.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: Don't add/del from name tree if name isnt set
Stephen Worley [Wed, 9 Oct 2019 23:35:46 +0000 (19:35 -0400)]
lib: Don't add/del from name tree if name isnt set

If the name has not been set yet (we were only passed the
ifindex in some cases like with master/slave timings) then
do not add/del it from the ifname rb tree on the vrf struct.

Doing so causes duplicate entries on the tree and infinte loops
can happen when iterating over it.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: Use correct if compare function in tree proto
Stephen Worley [Wed, 9 Oct 2019 20:43:27 +0000 (16:43 -0400)]
lib: Use correct if compare function in tree proto

We were using the incorrect comparison function for the
ifindex-based rb tree. Luckily, we were using the correct one
in RB_GENERATE so I guess that overwrote what was declared in the
prototype?

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years ago*: add ietf routing types yang module in makefile
Chirag Shah [Wed, 9 Oct 2019 20:19:50 +0000 (13:19 -0700)]
*: add ietf routing types yang module in makefile

Adding ietf routing types yang module to makefile

lib: Adding this yang module to common place
so it can be accessed from all frr modules.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agoyang: add ietf routing types module
Chirag Shah [Fri, 4 Oct 2019 20:49:03 +0000 (13:49 -0700)]
yang: add ietf routing types module

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: AS paths are uint32_t instead of integers
Donald Sharp [Wed, 9 Oct 2019 20:10:44 +0000 (16:10 -0400)]
bgpd: AS paths are uint32_t instead of integers

We have some JSON output that was displaying high order
AS path data as negative numbers:

{
 "paths":[
    {
      "aspath":{
        "string":"4200010118 4200010000 20473 1299",
        "segments":[
          {
            "type":"as-sequence",
            "list":[
              -94957178,
              -94957296,
              20473,
              1299
            ]
          }
        ],

Notice "String" output -vs- the list.

With fixed code:

  "paths":[
    {
      "aspath":{
        "string":"64539 4294967000 15096 6939 7922 7332 4249",
        "segments":[
          {
            "type":"as-sequence",
            "list":[
              64539,
              4294967000,
              15096,
              6939,
              7922,
              7332,
              4249
            ]
          }
        ],

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5126 from qlyoung/fix-grpc-build
Renato Westphal [Wed, 9 Oct 2019 19:43:33 +0000 (16:43 -0300)]
Merge pull request #5126 from qlyoung/fix-grpc-build

lib: fix gRPC northbound plugin build

4 years agodoc: add style guide for YANG
Quentin Young [Wed, 9 Oct 2019 19:27:13 +0000 (19:27 +0000)]
doc: add style guide for YANG

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5127 from opensourcerouting/asan-updates
Quentin Young [Wed, 9 Oct 2019 15:58:56 +0000 (11:58 -0400)]
Merge pull request #5127 from opensourcerouting/asan-updates

configure.ac/doc: update address sanitizer pointers

4 years agoMerge pull request #5125 from donaldsharp/pim_warnings_to_debugs
Donatas Abraitis [Wed, 9 Oct 2019 12:38:29 +0000 (15:38 +0300)]
Merge pull request #5125 from donaldsharp/pim_warnings_to_debugs

pimd: Fix zlog_warn when we mean debug and vice versa

4 years agodoc: update topotests doc for address sanitizer
Rafael Zalamena [Wed, 9 Oct 2019 00:35:06 +0000 (21:35 -0300)]
doc: update topotests doc for address sanitizer

Use the `--enable-address-sanitizer` option instead of the manual
version using environment flags.

This also avoids the problem of having to remember to skip clippy with
the custom flags:

```
make -C lib CFLAGS="-g -O2" LDFLAGS="-g" clippy
```

The snippet above is not needed with `--enable-address-sanitizer`!

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoconfigure.ac: fix memory sanitizer test
Rafael Zalamena [Tue, 8 Oct 2019 23:47:38 +0000 (20:47 -0300)]
configure.ac: fix memory sanitizer test

We should test for `-fsanitize=memory` instead of `-fsanitize=thread`
when enabling memory sanitizer. While here, fix the error message.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agolib: fix gRPC northbound plugin build
Quentin Young [Tue, 8 Oct 2019 19:13:50 +0000 (19:13 +0000)]
lib: fix gRPC northbound plugin build

Some issues with our internal vector type being typedef'd as `vector`,
which conflicts with the C++ standard vector class...

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5120 from sworleys/PBR-LL-FIX
Jafar Al-Gharaibeh [Tue, 8 Oct 2019 16:49:02 +0000 (09:49 -0700)]
Merge pull request #5120 from sworleys/PBR-LL-FIX

pbrd: Don't track ipv6 link locals

4 years agoMerge pull request #5121 from idryzhov/remove-brackets
Quentin Young [Tue, 8 Oct 2019 15:36:22 +0000 (11:36 -0400)]
Merge pull request #5121 from idryzhov/remove-brackets

*: remove redundant brackets in commands

4 years agoMerge pull request #5123 from idryzhov/fix-typo
Quentin Young [Tue, 8 Oct 2019 15:34:36 +0000 (11:34 -0400)]
Merge pull request #5123 from idryzhov/fix-typo

lib: fix typo

4 years agopimd: Fix zlog_warn when we mean debug and vice versa
Donald Sharp [Tue, 8 Oct 2019 14:36:02 +0000 (10:36 -0400)]
pimd: Fix zlog_warn when we mean debug and vice versa

There are several places in the pim where we are mixing up
zlog_warn w/ zlog_debug and vice versa.  If we are protecting
a zlog_warn w/ a debug is it really a warn?  If we have an actual
error situation we should also warn about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: fix typo
Igor Ryzhov [Tue, 8 Oct 2019 13:52:33 +0000 (16:52 +0300)]
lib: fix typo

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years ago*: remove redundant brackets in commands
Igor Ryzhov [Tue, 8 Oct 2019 12:30:38 +0000 (15:30 +0300)]
*: remove redundant brackets in commands

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agovtysh: fix searching commands in parent nodes
Pavel Ivashchenko [Mon, 30 Sep 2019 15:57:10 +0000 (15:57 +0000)]
vtysh: fix searching commands in parent nodes

  Do not check parent command nodes in case of ambiguous and incomplete commands

Signed-off-by: Pavel Ivashchenko <pivashchenko@nfware.com>
4 years agodoc: Replace `ip` prefix for as-path and community lists to `bgp`
Donatas Abraitis [Tue, 8 Oct 2019 06:08:36 +0000 (09:08 +0300)]
doc: Replace `ip` prefix for as-path and community lists to `bgp`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Remove depracated `ip` prefix for as-path/extcommunity/large/communities
Donatas Abraitis [Mon, 2 Sep 2019 15:11:40 +0000 (18:11 +0300)]
bgpd: Remove depracated `ip` prefix for as-path/extcommunity/large/communities

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agopbrd: Don't track ipv6 link locals
Stephen Worley [Mon, 7 Oct 2019 22:01:21 +0000 (18:01 -0400)]
pbrd: Don't track ipv6 link locals

Don't bother tracking ipv6 link locals to determine if a map
should be installed. Every interface has a route of `fe80::/64`
so its just going to return the arbitrarily first one it finds
when it resolves it and hands it back to us.

Instead, just track the interface we specify along with it.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agobgpd: Bug fix in "show bgp l2vpn evpn neighbors X.X.X.X routes json"
Lakshman Krishnamoorthy [Mon, 7 Oct 2019 21:20:02 +0000 (14:20 -0700)]
bgpd: Bug fix in "show bgp l2vpn evpn neighbors X.X.X.X routes json"

Fixed memory leak and  incorrect json output. Check the full output in the PR:
https://github.com/FRRouting/frr/pull/5118

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
4 years agoMerge pull request #5112 from qlyoung/cli-reject-ipv4-leading-zero
Jafar Al-Gharaibeh [Mon, 7 Oct 2019 20:05:09 +0000 (13:05 -0700)]
Merge pull request #5112 from qlyoung/cli-reject-ipv4-leading-zero

lib: reject leading 0 in ipv4 decimal quad

4 years agoMerge pull request #5105 from donaldsharp/watchfrr_more_systemd_status
Donatas Abraitis [Mon, 7 Oct 2019 17:46:46 +0000 (20:46 +0300)]
Merge pull request #5105 from donaldsharp/watchfrr_more_systemd_status

lib, watchfrr: Add some additional status messages to systemd

4 years agoMerge pull request #5106 from ton31337/fix/maximum-prefix_uint16_to_uint32
Quentin Young [Mon, 7 Oct 2019 16:33:04 +0000 (12:33 -0400)]
Merge pull request #5106 from ton31337/fix/maximum-prefix_uint16_to_uint32

bgpd: Use uint32_t for maximum-prefix

4 years agolib: reject leading 0 in ipv4 decimal quad
Quentin Young [Mon, 7 Oct 2019 15:36:39 +0000 (15:36 +0000)]
lib: reject leading 0 in ipv4 decimal quad

inet_pton() is used to parse ipv4 addresses internally, therefore FRR
does not support octal notation for quads. The ipv4 cli token validator
should make sure that str2prefix() can parse tokens it allows, and
str2prefix uses inet_pton, so we have to disallow leading zeros in ipv4
quads.

In short, 1.1.1.01 is no longer valid and must be expressed as 1.1.1.1.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4964 from ashish12pant/ecmp_tests
Martin Winter [Fri, 4 Oct 2019 19:02:27 +0000 (21:02 +0200)]
Merge pull request #4964 from ashish12pant/ecmp_tests

tests: Fix bgp-ecmp-topo2

4 years agoMerge branch 'master' into ecmp_tests
Martin Winter [Fri, 4 Oct 2019 13:19:17 +0000 (15:19 +0200)]
Merge branch 'master' into ecmp_tests

4 years agoMerge pull request #5005 from Frankkkkk/dockerfile
Donatas Abraitis [Fri, 4 Oct 2019 12:51:23 +0000 (13:51 +0100)]
Merge pull request #5005 from Frankkkkk/dockerfile

Make docker images lighter and with less layers

4 years agobgpd: Use uint32_t for maximum-prefix
Donatas Abraitis [Thu, 3 Oct 2019 21:30:28 +0000 (00:30 +0300)]
bgpd: Use uint32_t for maximum-prefix

Currently we have unsigned long which is not what we defined
in CLI (1-4294967295).

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5082 from donaldsharp/add_bgp_rr_ibgp_topotest
Donatas Abraitis [Fri, 4 Oct 2019 10:32:20 +0000 (11:32 +0100)]
Merge pull request #5082 from donaldsharp/add_bgp_rr_ibgp_topotest

tests: Add a topology that shows broken ibgp Route Reflector behavior

4 years agoZebra: Fixing Review comments in Zebra_MLAG
Satheesh Kumar K [Tue, 24 Sep 2019 09:29:15 +0000 (02:29 -0700)]
Zebra: Fixing Review comments in Zebra_MLAG

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
4 years agolib, watchfrr: Add some additional status messages to systemd
Donald Sharp [Fri, 4 Oct 2019 01:09:28 +0000 (21:09 -0400)]
lib, watchfrr: Add some additional status messages to systemd

Allow systemd to be informed about operational state so operators can
infer a bit about what is going on with FRR from the systemd status
cli.

sharpd@robot ~/frr4> systemctl status frr
● frr.service - FRRouting
   Loaded: loaded (/usr/lib/systemd/system/frr.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2019-10-03 21:09:04 EDT; 7s ago
     Docs: https://frrouting.readthedocs.io/en/latest/setup.html
  Process: 32455 ExecStart=/usr/lib/frr/frrinit.sh start (code=exited, status=0/SUCCESS)
   Status: "FRR Operational"
    Tasks: 12 (limit: 4915)
   Memory: 76.5M
   CGroup: /system.slice/frr.service
           ├─32468 /usr/lib/frr/watchfrr -d zebra bgpd staticd
           ├─32487 /usr/lib/frr/zebra -d -A 127.0.0.1 -s 90000000
           ├─32492 /usr/lib/frr/bgpd -d -A 127.0.0.1
           └─32500 /usr/lib/frr/staticd -d -A 127.0.0.1

Please note the `Status: ...` line above.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5102 from donaldsharp/fix_some_warnings
Jafar Al-Gharaibeh [Thu, 3 Oct 2019 17:38:29 +0000 (10:38 -0700)]
Merge pull request #5102 from donaldsharp/fix_some_warnings

Fix some warnings

4 years agoMerge pull request #5103 from donaldsharp/doc_dont
Donatas Abraitis [Thu, 3 Oct 2019 15:58:11 +0000 (18:58 +0300)]
Merge pull request #5103 from donaldsharp/doc_dont

doc: Add some additional warnings around Turning off bgp capabilities

4 years agoMerge pull request #5079 from mjstapp/fix_dplane_drop_at_shut
Donald Sharp [Thu, 3 Oct 2019 15:49:07 +0000 (11:49 -0400)]
Merge pull request #5079 from mjstapp/fix_dplane_drop_at_shut

zebra: during shutdown processing, drop dplane results

4 years agodoc: Add some additional warnings around Turning off bgp capabilities
Donald Sharp [Thu, 3 Oct 2019 13:26:46 +0000 (09:26 -0400)]
doc: Add some additional warnings around Turning off bgp capabilities

FRR supports the ability to turn off the negotation of bgp capabilities.
Provide a few bread crumbs to the operator that it might not be as
useful as they would hope.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: bgp pointer may be null
Donald Sharp [Thu, 3 Oct 2019 12:57:55 +0000 (08:57 -0400)]
bgpd: bgp pointer may be null

The bgp pointer may not be actually found.  The debug
message that was using it could get the same value
another way.  Convert over

Fixes Coverity Scan Issue:

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Show to compiler that uint64_t -> uint32_t is ok here
Donald Sharp [Thu, 3 Oct 2019 12:55:29 +0000 (08:55 -0400)]
bgpd: Show to compiler that uint64_t -> uint32_t is ok here

We only have a uint32_t value here but clippy is wise and
gives us more data than we need. Tell the compiler we can
throw some stuff away.

This was found by inspecting CI results.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Remove sleep from test_bgp_maximum_prefix_invalid_update
Donatas Abraitis [Thu, 3 Oct 2019 11:08:51 +0000 (14:08 +0300)]
tests: Remove sleep from test_bgp_maximum_prefix_invalid_update

Sleep is not needed here while we fail instantly if maximum is reached.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Keep the session down if maximum-prefix is reached
Donatas Abraitis [Wed, 2 Oct 2019 15:06:37 +0000 (18:06 +0300)]
bgpd: Keep the session down if maximum-prefix is reached

Under high load instances with hundreds of thousands of prefixes this
could result in very unstable systems.

When maximum-prefix is set, but restart timer is not set then the session
flaps between Idle(Pfx) -> Established -> Idle(Pfx) states.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agotests: Enabling bgp-ecmp-topo2 test cases
Ashish Pant [Tue, 24 Sep 2019 04:50:08 +0000 (10:20 +0530)]
tests: Enabling bgp-ecmp-topo2 test cases

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
4 years agotests: Modify json for bgp-ecmp-topo2
Ashish Pant [Thu, 12 Sep 2019 04:41:59 +0000 (10:11 +0530)]
tests: Modify json for bgp-ecmp-topo2

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Modified json files to configure route-map which prefer global
address

4 years agotests: Add topojson route-map for nexthop
Ashish Pant [Thu, 12 Sep 2019 04:30:00 +0000 (10:00 +0530)]
tests: Add topojson route-map for nexthop

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Add route-map option for ipv6 nexthop

Fix typo in bgp configuration

4 years agotests: Fix topojson link local ipv6 address
Ashish Pant [Thu, 12 Sep 2019 04:24:44 +0000 (09:54 +0530)]
tests: Fix topojson link local ipv6 address

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Removed code that disabled link local ipv6 address on the interface

4 years agoMerge pull request #5095 from donaldsharp/static_fix_for_ROUTE_ALL
Jafar Al-Gharaibeh [Wed, 2 Oct 2019 16:30:36 +0000 (09:30 -0700)]
Merge pull request #5095 from donaldsharp/static_fix_for_ROUTE_ALL

ZEBRA_ROUTE_ALL fix

4 years agozebra: Fix redistribution deletion for ZEBRA_ROUTE_ALL
Donald Sharp [Wed, 2 Oct 2019 13:29:19 +0000 (09:29 -0400)]
zebra: Fix redistribution deletion for ZEBRA_ROUTE_ALL

commit ee8a72f315013aecd45bc9c3aaf7ea81b2ca747a

broke the usage of ZEBRA_ROUTE_ALL as a valid redistribution
command.  This commit puts it back in.  LDP uses ZEBRA_ROUTE_ALL
as an option to say it is interested in all REDISTRIBUTION events.

Fixes: #5072
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agosharpd: Start infrastructure to allow for redistribution testing
Donald Sharp [Wed, 2 Oct 2019 13:27:04 +0000 (09:27 -0400)]
sharpd: Start infrastructure to allow for redistribution testing

Start the work in sharpd to allow the testing of redistribution
of routes.  Namely telling zebra to tell us about redistribution events
via the callback.

Future work here will allow sharpd to specify the redistribution
events it wants and to allow us to track that via counters.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5090 from sworleys/Fix-Vrf_ID-Decode
Sri Mohana Singamsetty [Wed, 2 Oct 2019 02:22:53 +0000 (19:22 -0700)]
Merge pull request #5090 from sworleys/Fix-Vrf_ID-Decode

lib: Decode vrf_id update appropriately from zapi

4 years agoMerge pull request #5087 from opensourcerouting/topotest-skip-on-assert-failure
Donald Sharp [Tue, 1 Oct 2019 23:14:11 +0000 (19:14 -0400)]
Merge pull request #5087 from opensourcerouting/topotest-skip-on-assert-failure

topotests: skip tests when any assert fails

4 years agolib: Decode vrf_id update appropriately from zapi
Stephen Worley [Tue, 1 Oct 2019 23:02:33 +0000 (19:02 -0400)]
lib: Decode vrf_id update appropriately from zapi

The vrf_id in `zsend_interface_vrf_update()` is encoded as
a long via `stream_putl()`, we should decode it as such
as well.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: Fix static variable initialization
Juergen Werner [Tue, 1 Oct 2019 15:01:10 +0000 (17:01 +0200)]
lib: Fix static variable initialization

Signed-off-by: Juergen Werner <juergen@opensourcerouting.org>
4 years agolib: Revert "lib: Stop arm crash on shutdown"
Juergen Werner [Tue, 1 Oct 2019 13:23:55 +0000 (15:23 +0200)]
lib: Revert "lib: Stop arm crash on shutdown"

This reverts commit 11375c52740089b6b49ca7d56b2cea0c7208338c.

That commit was introduced to fix a CI failure, which should now not
accure due to the preceding commit/revert.

Signed-off-by: Juergen Werner <juergen@opensourcerouting.org>
4 years agolib: Revert usage of asm-code in MTYPE definitions
Juergen Werner [Tue, 1 Oct 2019 12:24:20 +0000 (14:24 +0200)]
lib: Revert usage of asm-code in MTYPE definitions

The asm-code was interpreted inconsistently for different platforms.
In particular for AArch64 this caused UB, if multiple static MTYPEs
where defined in one file. All static MTYPE_* could point to the same
memory location (namely the first defined MTYPE) OR to their respective
(correct) locations depending on the context of their usage.

Signed-off-by: Juergen Werner <juergen@opensourcerouting.org>
4 years agoMerge pull request #5086 from cfra/fix/isis-threeway
Donald Sharp [Tue, 1 Oct 2019 13:00:32 +0000 (09:00 -0400)]
Merge pull request #5086 from cfra/fix/isis-threeway

isisd: Fix handling of neighbor circuit id in three way handshake

4 years agotests: Add a topology that shows broken ibgp behavior
Donald Sharp [Mon, 30 Sep 2019 12:49:40 +0000 (08:49 -0400)]
tests: Add a topology that shows broken ibgp behavior

In a leaf/spine topology with only IBGP connections, where
the same network is being redistributed at multiple points
in the network ( say a redistribute connected at both leaf and spines )
we end up in a state where zebra gets very confused.

eva# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

C>* 192.168.1.0/24 is directly connected, tor1-eth0, 00:00:30
C>* 192.168.2.0/24 is directly connected, tor1-eth1, 00:00:30
B   192.168.3.0/24 [200/0] via 192.168.4.2 inactive, 00:00:25
                           via 192.168.6.2 inactive, 00:00:25
B>* 192.168.4.0/24 [200/0] via 192.168.2.3, tor1-eth1, 00:00:25
  *                        via 192.168.6.2 inactive, 00:00:25
C>* 192.168.5.0/24 is directly connected, tor1-eth2, 00:00:30
B>* 192.168.6.0/24 [200/0] via 192.168.4.2 inactive, 00:00:25
  *                        via 192.168.5.4, tor1-eth2, 00:00:25

Effectively we have ibgp routes recursing through ibgp routes
and there is no metric to discern whom to listen to.

This draft:
https://tools.ietf.org/html/draft-ietf-idr-bgp-optimal-route-reflection-19

appears to address this issue.  From looking at both cisco and arista
deployments they are handling this issue by having the route reflector
prefer the localy learned routes over from their clients.

Add this topology, in a broken state, so that when we do fix this issue
it is a simple matter of touching this topology up and re-adding it
to the normal daily builds.  I also wanted to add this topology
since it is in a state of `doneness` and I wanted to move onto
my normal day job without having to remember about this test.

This topology is not configured to be run as part of the normal
topotests.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoisisd: Fix handling of neighbor circuit id in three way handshake
Christian Franke [Mon, 30 Sep 2019 23:53:44 +0000 (01:53 +0200)]
isisd: Fix handling of neighbor circuit id in three way handshake

RFC 5303 states:

      If the system ID and Extended Local Circuit ID of the neighboring
      system are known (in adjacency three-way state Initializing or
      Up), the neighbor's system ID SHALL be reported in the Neighbor
      System ID field, and the neighbor's Extended Local Circuit ID
      SHALL be reported in the Neighbor Extended Local Circuit ID field.

There is nothing written about only setting the Extended circuit ID of the
adjacency only when we bring the three-way adjacency up.

In fact, we should always update it, to avoid the problem described in #4783.

Fixes: #4783
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
4 years agoMerge pull request #5085 from qlyoung/strip-trailing-whitespace-2019
Renato Westphal [Tue, 1 Oct 2019 01:53:56 +0000 (22:53 -0300)]
Merge pull request #5085 from qlyoung/strip-trailing-whitespace-2019

*: strip trailing whitespace

4 years agotopotests: skip tests when any assert fails
Rafael Zalamena [Tue, 1 Oct 2019 00:15:15 +0000 (21:15 -0300)]
topotests: skip tests when any assert fails

When an `assert` fails we should skip all other tests on the file. Once
a failure is detected we can't rely on the setup anymore, since most of
the tests assume the previous worked.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #5011 from karamalla0406/evpn_cli_json
Russ White [Mon, 30 Sep 2019 22:30:28 +0000 (18:30 -0400)]
Merge pull request #5011 from karamalla0406/evpn_cli_json

bgpd: Fixed 'show bgp l2vpn evpn json' to display all routes

4 years agoMerge pull request #5081 from pguibert6WIND/show_brief_doc
Quentin Young [Mon, 30 Sep 2019 19:06:42 +0000 (15:06 -0400)]
Merge pull request #5081 from pguibert6WIND/show_brief_doc

doc: add vty command information about brief usage

4 years ago*: strip trailing whitespace
Quentin Young [Mon, 30 Sep 2019 16:44:43 +0000 (16:44 +0000)]
*: strip trailing whitespace

Some of it has snuck by CI

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5060 from chiragshah6/evpn_dev2
Sri Mohana Singamsetty [Mon, 30 Sep 2019 16:12:51 +0000 (09:12 -0700)]
Merge pull request #5060 from chiragshah6/evpn_dev2

zebra: fix evpn prefix-routes-only for default vrf

4 years agoMerge pull request #5009 from donaldsharp/interface_deletion
Russ White [Mon, 30 Sep 2019 11:46:19 +0000 (07:46 -0400)]
Merge pull request #5009 from donaldsharp/interface_deletion

lib, zebra: Allow for interface deletion when kernel event happens

4 years agodoc: add vty command information about brief usage
Philippe Guibert [Mon, 30 Sep 2019 07:33:48 +0000 (09:33 +0200)]
doc: add vty command information about brief usage

brief keyword can be used along with vrf NAME or vrf all.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: Fixing "show bgp l2vpn evpn neighbors x.x.x.x advertised-routes json
Lakshman Krishnamoorthy [Fri, 27 Sep 2019 18:45:38 +0000 (11:45 -0700)]
bgpd: Fixing "show bgp l2vpn evpn neighbors x.x.x.x advertised-routes json

Display output from adj_out instead of the rib table.

Also fixes crash for the json output. RCA: prefix is written to json object
using inet_ntop. But, this api returns null buffer for AF_EVPN address family
(it works only for AF_INET and AF_INET6).  This null buffer is then deref'd
by json-object-to string api.

Full output shown in PR: https://github.com/FRRouting/frr/pull/5078
Crash issue: https://github.com/FRRouting/frr/issues/5010

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
5 years agobgpd: Adding new bgp evpn cli's for ip-prefix lookup
Lakshman Krishnamoorthy [Wed, 11 Sep 2019 07:01:39 +0000 (00:01 -0700)]
bgpd: Adding new bgp evpn cli's for ip-prefix lookup

Implement CLIs for the following, to filter for a prefix within
evpn type 5 route
1) show bgp l2vpn evpn A.B.C.D
2) show bgp l2vpn evpn A.B.C.D json
3) show bgp l2vpn evpn A.B.C.D/M
4) show bgp l2vpn evpn A.B.C.D/M json
5) show bgp l2vpn evpn X:X::X:X
6) show bgp l2vpn evpn X:X::X:X json
7) show bgp l2vpn evpn X:X::X:X/M
8) show bgp l2vpn evpn X:X::X:X/M json

Sample output provided here: https://github.com/FRRouting/frr/pull/4850

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
5 years agozebra: during shutdown processing, drop dplane results
Mark Stapp [Fri, 27 Sep 2019 16:15:34 +0000 (12:15 -0400)]
zebra: during shutdown processing, drop dplane results

Don't process dataplane results in zebra during shutdown (after
sigint has been seen). The dplane continues to run in order to
clean up, but zebra main just drops results.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agodocker/debian: Make docker images lighter and with less layers
Frank Villaro-Dixon [Wed, 18 Sep 2019 13:02:52 +0000 (15:02 +0200)]
docker/debian: Make docker images lighter and with less layers

Signed-off-by: Frank Villaro-Dixon <frank.villaro@infomaniak.com>
5 years agoMerge pull request #5066 from ak503/libfrr_crash
Donald Sharp [Thu, 26 Sep 2019 23:32:41 +0000 (19:32 -0400)]
Merge pull request #5066 from ak503/libfrr_crash

zebra: if_is_loopback_or_vrf crash if if_lookup_by_index return NULL

5 years agoMerge pull request #5067 from ton31337/fix/no_aggregate-address_command_for_route-map
Donald Sharp [Thu, 26 Sep 2019 21:40:41 +0000 (17:40 -0400)]
Merge pull request #5067 from ton31337/fix/no_aggregate-address_command_for_route-map

bgpd: Accept no aggregate-address <IP> route-map <RMAP> commands

5 years agoMerge pull request #5070 from ton31337/fix/aggregate-address_for_ipv6_summary-only_mi...
Donald Sharp [Thu, 26 Sep 2019 21:39:09 +0000 (17:39 -0400)]
Merge pull request #5070 from ton31337/fix/aggregate-address_for_ipv6_summary-only_missreading

bgpd: aggregate-address X:X::X:X/M summary-only was missreading config

5 years agoMerge pull request #5068 from donaldsharp/summary_only_is_not_a_route_map
Donatas Abraitis [Thu, 26 Sep 2019 18:53:50 +0000 (21:53 +0300)]
Merge pull request #5068 from donaldsharp/summary_only_is_not_a_route_map

bgpd: aggregate-address A.B.C.D A.B.C.D summary-only was missreading …

5 years agobgpd: aggregate-address X:X::X:X/M summary-only was missreading config
Donatas Abraitis [Thu, 26 Sep 2019 18:47:55 +0000 (21:47 +0300)]
bgpd: aggregate-address X:X::X:X/M summary-only was missreading config

Entering:
aggregate-address 2a02:4780::/48 summary-only

Will transform this to:
aggregate-address 2a02:4780::/48 summary-only route-map summary-only

This patch fixes that.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: aggregate-address A.B.C.D A.B.C.D summary-only was missreading config
Donald Sharp [Thu, 26 Sep 2019 16:37:28 +0000 (12:37 -0400)]
bgpd: aggregate-address A.B.C.D A.B.C.D summary-only was missreading config

The `aggregate-address 30.0.5.0 255.255.255.0 summary-only` command
was missreading the inputed data and translating it into:

`aggregate-address 30.0.5.0/24 summary-only route-map summary-only`

This is not quite correct.  Fix this behavior:

donna.cumulusnetworks.com# conf
donna.cumulusnetworks.com(config)# router bgp
donna.cumulusnetworks.com(config-router)# aggregate-address 30.0.5.0 255.255.255.0 summary-only
donna.cumulusnetworks.com(config-router)# do show run
Building configuration...

Current configuration:
!
frr version 7.3-dev
frr defaults datacenter
hostname donna.cumulusnetworks.com
log file /var/log/frr/frr.log
no ipv6 forwarding
frr version 7.2-dev
!
router bgp 500
 neighbor 192.168.209.1 remote-as external
 neighbor 192.168.209.1 ebgp-multihop 255
 neighbor 192.168.210.1 remote-as external
 !
 address-family ipv4 unicast
  network 192.168.9.0/24
  network 192.168.10.0/24
  aggregate-address 30.0.5.0/24 summary-only
 exit-address-family
!

Issue: #5054
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Accept no aggregate-address <IP> route-map <RMAP> commands
Donatas Abraitis [Thu, 26 Sep 2019 14:35:25 +0000 (17:35 +0300)]
bgpd: Accept no aggregate-address <IP> route-map <RMAP> commands

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agozebra: if_is_loopback_or_vrf crash if if_lookup_by_index return NULL
dturlupov [Thu, 26 Sep 2019 11:21:30 +0000 (14:21 +0300)]
zebra: if_is_loopback_or_vrf crash if if_lookup_by_index return NULL

Function if_lookup_by_index() can return NULL, but in if_is_loopback_or_vrf() we don't chech NULL and get next:

Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(zlog_backtrace_sigsafe+0x48) [0x7fb5f704cf18]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(zlog_signal+0x378) [0x7fb5f704d728]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(+0x6b495) [0x7fb5f706b495]
Sep 2 07:44:34 XXX zebra[4616]: /lib64/libpthread.so.0(+0x123b0) [0x7fb5f6d573b0]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(if_is_loopback+0) [0x7fb5f7045160]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(if_is_loopback_or_vrf+0x11) [0x7fb5f7045191]
Sep 2 07:44:34 XXX zebra[4616]: /usr/sbin/zebra() [0x43b26d]
Sep 2 07:44:34 XXX zebra[4616]: /usr/sbin/zebra() [0x43db6f]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(work_queue_run+0xc8) [0x7fb5f7080de8]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(thread_call+0x47) [0x7fb5f7077d27]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(frr_run+0xd8) [0x7fb5f704b448]

Signed-off-by: Dmitrii Turlupov dturlupov@factor-ts.ru
5 years agoMerge pull request #5062 from kuldeepkash/route_map
Donald Sharp [Thu, 26 Sep 2019 13:05:57 +0000 (09:05 -0400)]
Merge pull request #5062 from kuldeepkash/route_map

Add bgp route-map test cases

5 years agotests: Add bgp route-map test cases
Kuldeep Kashyap [Wed, 25 Sep 2019 11:56:13 +0000 (11:56 +0000)]
tests: Add bgp route-map test cases

Adding 27 bgp route-map test cases to test multiple route-map scenarios

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agotests: Add API to shut/noshut router interface
Kuldeep Kashyap [Wed, 25 Sep 2019 11:53:00 +0000 (11:53 +0000)]
tests: Add API to shut/noshut router interface

This API would help to shut/nohut specified router interfaces

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agotests: Adding verification APIs for bgp route-maps and community-lists
Kuldeep Kashyap [Wed, 25 Sep 2019 11:49:48 +0000 (11:49 +0000)]
tests: Adding verification APIs for bgp route-maps and community-lists

APIs to verify bgp route-maps, bgp community and large community configurations

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agotests: Enhance support to create bgp community-list or large-community-list
Kuldeep Kashyap [Wed, 25 Sep 2019 11:47:25 +0000 (11:47 +0000)]
tests: Enhance support to create bgp community-list or large-community-list

Adding new API to create bgp community-list or large-community-list

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agotests: Enhance framework to create and delete route-map
Kuldeep Kashyap [Wed, 25 Sep 2019 11:39:08 +0000 (11:39 +0000)]
tests: Enhance framework to create and delete route-map

Added APIs to create and delete route-maps configuration

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agotests: Add route-map to initial config creation from JSON
Kuldeep Kashyap [Wed, 25 Sep 2019 11:24:56 +0000 (11:24 +0000)]
tests: Add route-map to initial config creation from JSON

To enable route-map config build from JSON

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agotests: Adding API verify_bgp_attributes() to bgp.py
Kuldeep Kashyap [Wed, 25 Sep 2019 11:16:44 +0000 (11:16 +0000)]
tests: Adding API verify_bgp_attributes() to bgp.py

This API is to verify BGP attribute values set by route maps

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agoMerge pull request #5047 from dslicenc/bgp-next-hop-routemap
Donatas Abraitis [Thu, 26 Sep 2019 08:17:51 +0000 (11:17 +0300)]
Merge pull request #5047 from dslicenc/bgp-next-hop-routemap

bgpd: stop sending nexthop set by "route-map in" to eBGP peers

5 years agobgpd: stop sending nexthop set by "route-map in" to eBGP peers
Don Slice [Tue, 24 Sep 2019 12:02:02 +0000 (05:02 -0700)]
bgpd: stop sending nexthop set by "route-map in" to eBGP peers

Problem reported that when a "neighbor x.x.x.x route-map FOO in"
set a next-hop value, that modified next-hop value was also sent
to eBGP peers.  This is incorrect since bgp is expected to set
next-hop to self when sending to eBGP peers unless third party
next-hop on a shared segment is true.  This fix modifies the
behavior to stop sending the modified next-hop to eBGP peers
if the route-map was applied inbound on another peer.

Ticket: CM-26025
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #5058 from mjstapp/fix_dplane_config_handler
Donald Sharp [Wed, 25 Sep 2019 20:47:47 +0000 (16:47 -0400)]
Merge pull request #5058 from mjstapp/fix_dplane_config_handler

zebra: handle config write for dataplane values

5 years agoMerge pull request #5051 from idryzhov/fix-vrf-autocomplete
Donald Sharp [Wed, 25 Sep 2019 19:27:55 +0000 (15:27 -0400)]
Merge pull request #5051 from idryzhov/fix-vrf-autocomplete

*: fix missing VRF autocompletions

5 years agozebra: fix evpn prefix-routes-only for default vrf
Chirag Shah [Wed, 25 Sep 2019 18:48:45 +0000 (11:48 -0700)]
zebra: fix evpn prefix-routes-only for default vrf

asymmetric routing default vrf vni configuration
is not displayed as part of running-config.

Ticket:CM-26470
Reviewed By:
Testing Done:

T11# config t
T11(config)# vni 4004 prefix-routes-only
T11(config)# end

Before:

T11# show running-config
...
vni 4004
...

After:

T11# show running-config
...
vni 4004 prefix-routes-only
...

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agozebra: handle config write for dataplane values
Mark Stapp [Wed, 25 Sep 2019 18:05:50 +0000 (14:05 -0400)]
zebra: handle config write for dataplane values

Add the (single) dataplane config value to the output of
config write, 'show run' - missed this during dplane development.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #5053 from donaldsharp/more_sa_stuff_this_evening
Mark Stapp [Wed, 25 Sep 2019 15:23:49 +0000 (11:23 -0400)]
Merge pull request #5053 from donaldsharp/more_sa_stuff_this_evening

More sa stuff this evening