]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
5 years agoospf6d: stop looping thru same Inter-Area Router LSAs 6223/head
Don Slice [Thu, 2 Apr 2020 20:17:33 +0000 (20:17 +0000)]
ospf6d: stop looping thru same Inter-Area Router LSAs

Processing loop uncovered when there are multiple ABRs also
acting as ASBRs into the same area in ospf6.  The problem
was that when looking thru the list of Inter-area router
entries, if the current entry being processed matched, it
still merged next-hops and re-initiated the process.  In
this fix, if the route/path matches and the next-hops also
match, there is no need to re-initiate the examine process.

Ticket: CM-28900
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #6151 from sworleys/NHG-Backports_7.3
David Lamparter [Mon, 6 Apr 2020 16:04:16 +0000 (18:04 +0200)]
Merge pull request #6151 from sworleys/NHG-Backports_7.3

[7.3] NHG Backports

5 years agozebra: add null check before connecting recursive depend 6151/head
Stephen Worley [Tue, 21 Jan 2020 20:03:52 +0000 (15:03 -0500)]
zebra: add null check before connecting recursive depend

Add a null check in `handle_recursive_depend()` so it
doesn't try to add a NULL pointer to the RB tree.

This was found with clang SA.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit a7e1b02d4a6794a5caa475ab6e4bfc30fdc6b31b)

5 years agozebra: reset nexthop pointer in zread of nexthops
Stephen Worley [Mon, 6 Jan 2020 18:33:45 +0000 (13:33 -0500)]
zebra: reset nexthop pointer in zread of nexthops

We were not resetting the nexthop pointer to NULL for each
new read of a nexthop from the zapi route. On the chance we
get a nexthop that does not have a proper type, we will not
create a new nexthop and update that pointer, thus it still
has the last valid one and will create a group with two
pointers to the same nexthop.

Then when it enters any code that iterates the group, it loops
endlessly.

This was found with zapi fuzzing.

```
0x00007f728891f1c3 in jhash2 (k=<optimized out>, length=<optimized out>, initval=12183506) at lib/jhash.c:138
0x00007f728896d92c in nexthop_hash (nexthop=<optimized out>) at lib/nexthop.c:563
0x00007f7288979ece in nexthop_group_hash (nhg=<optimized out>) at lib/nexthop_group.c:394
0x0000000000621036 in zebra_nhg_hash_key (arg=<optimized out>) at zebra/zebra_nhg.c:356
0x00007f72888ec0e1 in hash_get (hash=<optimized out>, data=0x7ffffb94aef0, alloc_func=0x0) at lib/hash.c:138
0x00007f72888ee118 in hash_lookup (hash=0x7f7288de2f10, data=0x7f728908e7fc) at lib/hash.c:183
0x0000000000626613 in zebra_nhg_find (nhe=0x7ffffb94b080, id=0, nhg=0x6020000032d0, nhg_depends=0x0, vrf_id=<optimized out>,
    afi=<optimized out>, type=<optimized out>) at zebra/zebra_nhg.c:541
0x0000000000625f39 in zebra_nhg_rib_find (id=0, nhg=<optimized out>, rt_afi=AFI_IP) at zebra/zebra_nhg.c:1126
0x000000000065f953 in rib_add_multipath (afi=AFI_IP, safi=<optimized out>, p=0x7ffffb94b370, src_p=0x0, re=0x6070000013d0,
    ng=0x7f728908e7fc) at zebra/zebra_rib.c:2616
0x0000000000768f90 in zread_route_add (client=0x61f000000080, hdr=<optimized out>, msg=<optimized out>, zvrf=<optimized out>)
    at zebra/zapi_msg.c:1596
0x000000000077c135 in zserv_handle_commands (client=<optimized out>, msg=0x61b000000780) at zebra/zapi_msg.c:2636
0x0000000000575e1f in main (argc=<optimized out>, argv=<optimized out>) at zebra/main.c:309
```

```
(gdb) p *nhg->nexthop
$4 = {next = 0x5488e0, prev = 0x5488e0, vrf_id = 16843009, ifindex = 16843009, type = NEXTHOP_TYPE_IFINDEX, flags = 8 '\b', {gate = {ipv4 = {s_addr = 0},
      ipv6 = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}},
    bh_type = BLACKHOLE_UNSPEC}, src = {ipv4 = {s_addr = 0}, ipv6 = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0,
          0}, __u6_addr32 = {0, 0, 0, 0}}}}, rmap_src = {ipv4 = {s_addr = 0}, ipv6 = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0,
          0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}}, resolved = 0x0, rparent = 0x0, nh_label_type = ZEBRA_LSP_NONE, nh_label = 0x0, weight = 1 '\001'}
(gdb) quit

```

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit c8b891b48392e0d29eb7b56942e4df697d4c14fd)

5 years agozebra: don't created connected if duplicate depend
Stephen Worley [Mon, 6 Jan 2020 17:58:41 +0000 (12:58 -0500)]
zebra: don't created connected if duplicate depend

Since we are using a UNIQUE RB tree, we need to handle the
case of adding in a duplicate entry into it.

The list API code returns NULL when a successfull add
occurs, so lets pull that handling further up into
the connected handlers. Then, free the allocated
connected struct if it is a duplicate.

This is a pretty unlikely situation to happen.

Also, pull up the RB handling of _del RB API as well.

This was found with the zapi fuzzing code.

```
==1052840==
==1052840== 200 bytes in 5 blocks are definitely lost in loss record 545 of 663
==1052840==    at 0x483BB1A: calloc (vg_replace_malloc.c:762)
==1052840==    by 0x48E1008: qcalloc (memory.c:110)
==1052840==    by 0x44D357: nhg_connected_new (zebra_nhg.c:73)
==1052840==    by 0x44D300: nhg_connected_tree_add_nhe (zebra_nhg.c:123)
==1052840==    by 0x44FBDC: depends_add (zebra_nhg.c:1077)
==1052840==    by 0x44FD62: depends_find_add (zebra_nhg.c:1090)
==1052840==    by 0x44E46D: zebra_nhg_find (zebra_nhg.c:567)
==1052840==    by 0x44E1FE: zebra_nhg_rib_find (zebra_nhg.c:1126)
==1052840==    by 0x45AD3D: rib_add_multipath (zebra_rib.c:2616)
==1052840==    by 0x4977DC: zread_route_add (zapi_msg.c:1596)
==1052840==    by 0x49ABB9: zserv_handle_commands (zapi_msg.c:2636)
==1052840==    by 0x428B11: main (main.c:309)
```

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit 5bf15faa19288144c214ca48ef26e01512037ef6)

5 years agozebra: break if duplicate nexthop found in nhe2grp
Stephen Worley [Thu, 26 Mar 2020 14:57:45 +0000 (10:57 -0400)]
zebra: break if duplicate nexthop found in nhe2grp

If we find that a nexthop is a duplicate, break immediately
rather than continuing to look through the rest of the list.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit d43122b58f4bf9cb729c786b990ae254b8dde35b)

5 years agozebra: properly set the NEXTHOP_GROUP_VALID flag
Stephen Worley [Thu, 30 Jan 2020 21:43:09 +0000 (16:43 -0500)]
zebra: properly set the NEXTHOP_GROUP_VALID flag

Properly set the NEXTHOP_GROUP_VALID flag and use it
as a conditional for installation decisions for individual
nexthop and groups containing it.

We set the NEXTHOP_GROUP_VALID flag it is:

1) A fully resolved active nexthop
or
2) Its a group that contains at least one VALID NHE

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit 086e4e02f5fe02849ad9a6c17472094c1c1cbd98)

5 years agozebra: set valid on re->nhe directly in nexthop_active_update()
Stephen Worley [Thu, 30 Jan 2020 17:34:35 +0000 (12:34 -0500)]
zebra: set valid on re->nhe directly in nexthop_active_update()

We were still doing a lookup on the nhe_id from before we
started referencing re->nhe directly.

Change set flag to just use re->nhe directly here since they
should always be the same at this point in the code anyway.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit 715e5c70d564017a8b709599e23bf94884ab9bb9)

5 years agozebra: add debug for duplicate NH in dataplane array conversion
Stephen Worley [Tue, 28 Jan 2020 20:20:18 +0000 (15:20 -0500)]
zebra: add debug for duplicate NH in dataplane array conversion

When we find a nexthop ID thats a duplicate in the code that converts
NHG rb trees into a flat list of nexthop IDs for the dataplane,
output a debug message.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit b1c3f7ef80fb626a15a1043b4c46f53c3fd34826)

5 years agozebra: don't add ID to kernel nh_grp if not installed/queued
Stephen Worley [Tue, 28 Jan 2020 19:33:10 +0000 (14:33 -0500)]
zebra: don't add ID to kernel nh_grp if not installed/queued

When we transform the nexthop group rb trees into a flat
array of IDs to send into the dataplane code (zebra_nhg_nhe2grp),
don't put an ID in there that has not been in installed or is
not currently queued to be installed into the dataplane.

Otherwise, if some of the nexthops fail to install, we will
still try to create a group with them and then the entire group
will fail.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit 1866b3afc259c565f42a9aab262ede27c142eea4)

5 years agozebra: handle NHG in NHG dataplane group conversion
Stephen Worley [Tue, 28 Jan 2020 00:36:01 +0000 (19:36 -0500)]
zebra: handle NHG in NHG dataplane group conversion

We were not properly handling the case of a NHG inside of
another NHG when converting the rb tree of a multilevel NHG
into a flat list of IDs. When constructing, we call the function
zebra_nhg_nhe2grp_internal() recursively so that the rare
case of a group within a group is handled such that its
singleton nexthops are appended to the grp array of IDs
we send to the dataplane code.

Ex)

1:
-> 2:
-> 3
-> 4
->5:
->6

becomes this:

1:
->3
->4
->6

when its sent to the dataplane code for final kernel installation.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit 497ff5792f6a27702bf4ee33b79e1a80ffcf0a09)

5 years agoMerge pull request #6142 from opensourcerouting/7.3/defaults-fix-bools
Donald Sharp [Thu, 2 Apr 2020 22:49:43 +0000 (18:49 -0400)]
Merge pull request #6142 from opensourcerouting/7.3/defaults-fix-bools

[7.3] bgpd, ospfd, ospf6d: long is not bool :(

5 years agoMerge pull request #6140 from sworleys/NHG-Fix-Dup-Leak_7.3
Mark Stapp [Thu, 2 Apr 2020 19:25:32 +0000 (15:25 -0400)]
Merge pull request #6140 from sworleys/NHG-Fix-Dup-Leak_7.3

[7.3] zebra: free unhashable (dup) NHEs via ID table cleanup

5 years agobgpd, ospfd, ospf6d: long is not bool :( 6142/head
David Lamparter [Thu, 2 Apr 2020 19:16:04 +0000 (21:16 +0200)]
bgpd, ospfd, ospf6d: long is not bool :(

... Oops ...

(for context, the defaults code originally didn't have a dedicated
"bool" variant and just used long for bools...  I derp'd this when
adding bool as a separate case :( )

Reported-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@diac24.net>
(cherry picked from commit 4c1458b595282bff6a6e0b20767bb5cb655d0b4c)

5 years agozebra: free unhashable (dup) NHEs via ID table cleanup 6140/head
Stephen Worley [Wed, 1 Apr 2020 19:31:40 +0000 (15:31 -0400)]
zebra: free unhashable (dup) NHEs via ID table cleanup

Free unhashable (duplicate NHEs from the kernel) via ID table
cleanup. Since the NHE ID hash table contains extra entries,
that's the one we need to be calling zebra_nhg_hash_free()
on, otherwise we will never free the unhashable NHEs.

This was found via a memleak:

==1478713== HEAP SUMMARY:
==1478713==     in use at exit: 10,267 bytes in 46 blocks
==1478713==   total heap usage: 76,810 allocs, 76,764 frees, 3,901,237 bytes allocated
==1478713==
==1478713== 208 (88 direct, 120 indirect) bytes in 1 blocks are definitely lost in loss record 35 of 41
==1478713==    at 0x483BB1A: calloc (vg_replace_malloc.c:762)
==1478713==    by 0x48E35E8: qcalloc (memory.c:110)
==1478713==    by 0x451CCB: zebra_nhg_alloc (zebra_nhg.c:369)
==1478713==    by 0x453DE3: zebra_nhg_copy (zebra_nhg.c:379)
==1478713==    by 0x452670: nhg_ctx_process_new (zebra_nhg.c:1143)
==1478713==    by 0x4523A8: nhg_ctx_process (zebra_nhg.c:1234)
==1478713==    by 0x452A2D: zebra_nhg_kernel_find (zebra_nhg.c:1294)
==1478713==    by 0x4326E0: netlink_nexthop_change (rt_netlink.c:2433)
==1478713==    by 0x427320: netlink_parse_info (kernel_netlink.c:945)
==1478713==    by 0x432DAD: netlink_nexthop_read (rt_netlink.c:2488)
==1478713==    by 0x41B600: interface_list (if_netlink.c:1486)
==1478713==    by 0x457275: zebra_ns_enable (zebra_ns.c:127)

Repro with:
ip next add id 1 blackhole
ip next add id 2 blackhole

valgrind /usr/lib/frr/zebra

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit c25c3ea57a3dcd3b36d86ba76dd34961bcb662f0)

5 years agoMerge pull request #6136 from sworleys/NHG-Fix-Src_7.3
Mark Stapp [Thu, 2 Apr 2020 17:19:03 +0000 (13:19 -0400)]
Merge pull request #6136 from sworleys/NHG-Fix-Src_7.3

[7.3] zebra: determine src with nexthop objects as well

5 years agozebra: determine src when using nexthop objects 6136/head
Stephen Worley [Tue, 24 Mar 2020 21:32:21 +0000 (17:32 -0400)]
zebra: determine src when using nexthop objects

Determine src based on nexthop data even when we are using
kernel nexthop objects.

Before, we were entirely skipping this step and just sending the
nexthop ID, ignoring src determination.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit d8bfd8dc9a899f841967257a6b5f30910fdc17c8)

5 years agozebra: abstract route src determiniation into func
Stephen Worley [Tue, 24 Mar 2020 21:10:08 +0000 (17:10 -0400)]
zebra: abstract route src determiniation into func

Abstraction the route src determination from a nexthop in the
netlink code into a function for both singlepath and mutlipath
to call.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit 762288f50f5fa29512864fcc7814be83e1b58ff4)

5 years agoMerge pull request #6098 from opensourcerouting/73_topo-fixes
Donald Sharp [Fri, 27 Mar 2020 02:06:23 +0000 (22:06 -0400)]
Merge pull request #6098 from opensourcerouting/73_topo-fixes

Topotest fixes

5 years agotests: fix check for nhid in ipv6 table output 6098/head
Martin Winter [Fri, 20 Mar 2020 22:53:39 +0000 (23:53 +0100)]
tests: fix check for nhid in ipv6 table output

Check based on actual output instead of assuming output based
on kernel version

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agotests: Make topotest working on different locale
Martin Winter [Fri, 20 Mar 2020 22:50:29 +0000 (23:50 +0100)]
tests: Make topotest working on different locale

"sort" as used in all-protocol-startup used sort which causes
different sort order based on locale settings. Specify the
correct one to make output matching our expected result

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agoMerge pull request #6063 from donaldsharp/73_want_a_yump
Sri Mohana Singamsetty [Sat, 21 Mar 2020 01:11:37 +0000 (18:11 -0700)]
Merge pull request #6063 from donaldsharp/73_want_a_yump

yang: Partially revert code to restore functionality

5 years agoyang: Partially revert code to restore functionality 6063/head
Donald Sharp [Thu, 19 Mar 2020 02:30:28 +0000 (22:30 -0400)]
yang: Partially revert code to restore functionality

Partially revert code from commit:
f22b9250853229c93617ffdad139a4762f5f7348

since this broke passive-interface, network and offset-list
commands in rip and ripng

Fixes: #6001
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5980 from donaldsharp/backport_no_nhg_kernel_73
Donatas Abraitis [Thu, 12 Mar 2020 08:43:18 +0000 (10:43 +0200)]
Merge pull request #5980 from donaldsharp/backport_no_nhg_kernel_73

zebra: [7.3] add config to disable use of kernel nexthops

5 years agozebra: add config to disable use of kernel nexthops 5980/head
Mark Stapp [Tue, 28 Jan 2020 16:00:42 +0000 (11:00 -0500)]
zebra: add config to disable use of kernel nexthops

Add a config that disables use of kernel-level nexthop ids.
Currently, zebra always uses nexthop ids if the kernel supports
them.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #5888 from ton31337/fix/do_not_show_failed_if_shutdown_7.3
Russ White [Tue, 3 Mar 2020 14:37:47 +0000 (09:37 -0500)]
Merge pull request #5888 from ton31337/fix/do_not_show_failed_if_shutdown_7.3

bgpd: [7.3] `show bgp summary failed` backports

5 years agobgpd: Format properly `show bgp summary failed` 5888/head
Donatas Abraitis [Tue, 11 Feb 2020 16:02:19 +0000 (18:02 +0200)]
bgpd: Format properly `show bgp summary failed`

Before:
```
Neighbor        EstdCnt DropCnt ResetTime Reason
192.168.0.1           0       0    never  Waiting for peer OPEN
```

After:
```
Neighbor        EstdCnt DropCnt ResetTime Reason
192.168.0.1           0       0     never Waiting for peer OPEN
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: Show the real reason why the peer is failed
Donatas Abraitis [Fri, 14 Feb 2020 21:21:55 +0000 (23:21 +0200)]
bgpd: Show the real reason why the peer is failed

If the peer was shutdown locally, it doesn't show up as admin. shutdown.
Instead it's treated as "Waiting for peer OPEN".

The same applies to when the peer reaches maximum-prefix count.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: Update failed reason to distinguish some NHT scenarios
Donald Sharp [Tue, 11 Feb 2020 00:25:52 +0000 (19:25 -0500)]
bgpd: Update failed reason to distinguish some NHT scenarios

Current failed reasons for bgp when you have a peer that
is not online yet is `Waiting for NHT`, even if NHT has
succeeded.  Add some code to differentiate this.

eva# show bgp ipv4 uni summ failed
BGP router identifier 192.168.201.135, local AS number 3923 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 2, using 43 KiB of memory
Neighbor        EstdCnt DropCnt ResetTime Reason
192.168.44.1          0       0    never  Waiting for NHT
192.168.201.139       0       0    never  Waiting for Open to Succeed
Total number of neighbors 2
eva#

eva# show bgp nexthop
Current BGP nexthop cache:
 192.168.44.1 invalid, peer 192.168.44.1
  Must be Connected
  Last update: Mon Feb 10 19:05:19 2020

 192.168.201.139 valid [IGP metric 0], #paths 0, peer 192.168.201.139

So 192.168.201.139 is a peer for a connected route that has not been
created on .139, while 44.1 nexthop tracking has not succeeded yet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5832 from mjstapp/fix_rtadv_stubs_7_3
Donatas Abraitis [Wed, 19 Feb 2020 20:02:24 +0000 (21:02 +0100)]
Merge pull request #5832 from mjstapp/fix_rtadv_stubs_7_3

[7.3] zebra: Fix rtadv stubs

5 years agozebra: fix missing route-advert stubs 5832/head
Mark Stapp [Wed, 19 Feb 2020 13:44:05 +0000 (08:44 -0500)]
zebra: fix missing route-advert stubs

Stubs are used when frr is built without route-advert
support; a couple of apis were missing, causing builds to fail.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoFRRouting Release 7.3 frr-7.3
Martin Winter [Fri, 14 Feb 2020 14:03:09 +0000 (15:03 +0100)]
FRRouting Release 7.3

BGPd
   EVPN PIP Support
   Route Aggregation code speed ups
   BGP Vector I/O speed ups
   New CLI: `set distance XXX`
   New CLI: `aggregate-address A.B.C.D/M route-map WORD`
   New CLI: `bgp reject-as-sets`
   New CLI: `advertise pip ...`
   New CLI: `match evpn rd ASN:NN_OR_IP-ADDRESS:NN`
   New CLI: `show bgp l2vpn evpn community|large-community X`
   New CLI: `show bgp l2vpn evpn A.B.C.D`
   Auto-completion for clear bgp command
   Add ability to set tcp socket buffer size
OSPFd
   Partial MPLS TE support
PBRd
   New CLI: `set vrf unchanged|NAME`
BFDd
   VRF Support
   New CLI: 'show bfd peers brief'
   New CLI: 'clear bfd peer ...'
PIMd
   Significant Speedups in accessing Internal Data for higher scale
   Support for joining any-source Multicast
   Updated CLI: 'show ip pim upstream-join-desired'
   New CLI: 'show ip pim channel'
   Debug Cleanup
   MLAG experimental support
VRRPd
   VRF Support
   Northbound Conversion- NHRPd
vtysh
   New CLI: `banner motd line LINE...`
yangx
   New CLI: `show yang operational-data XPATH`
   New CLI: `debug northbound`
Zebra
   Nexthop Group support
   New CLI: 'debug zebra nexthop [detail]'
   New CLI: 'show router-id'
   MLAG experimental support
watchfrr
   Additional status messages of system state to systemd
   New CLI: `watchfrr ignore DAEMON`
Others
   As always all daemons have received too many bug fixes to fully list
   There has been a significant focus on increasing test coverage
Change in Behavior:
   ISISd
      All areas created default automatically to level-1-2
   Zebra
      Nexthop Group Installation in Kernel is turned on by default
      if the kernel supports-    New CLI: 'show nexthop-group rib [singleton]'
   Man Pages
      Renamed to frr-* to remove collision with other packages

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agoMerge pull request #5782 from donaldsharp/bgp_73
Russ White [Tue, 11 Feb 2020 16:27:29 +0000 (11:27 -0500)]
Merge pull request #5782 from donaldsharp/bgp_73

[7.3]bgpd: Remove prefix pointer creation

5 years agoMerge pull request #5784 from donaldsharp/dc_73
Mark Stapp [Mon, 10 Feb 2020 15:49:44 +0000 (10:49 -0500)]
Merge pull request #5784 from donaldsharp/dc_73

[7.3] Double commit of nexthop cli changes to get this in.

5 years agodoc: Update doc to reflect changes in `show nexthop-group rib` command 5784/head
Donald Sharp [Wed, 15 Jan 2020 13:28:22 +0000 (08:28 -0500)]
doc: Update doc to reflect changes in `show nexthop-group rib` command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: nexthop groups vrf's are only a function of namespaces
Donald Sharp [Mon, 13 Jan 2020 21:11:46 +0000 (16:11 -0500)]
zebra: nexthop groups vrf's are only a function of namespaces

Nexthop groups as a whole do not make sense to have a vrf'ness
As that you can have a arbitrary number of nexthops that point
to separate vrf's.

Modify the code to make this distinction, by clearly delineating
the line between the nhg and the nexthop a bit better.
Nexthop groups having a vrf_id only make sense if you are using
network namespaces to represent them.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Modify 'show nexthop-group rib ip|ipv6'
Donald Sharp [Mon, 13 Jan 2020 21:00:33 +0000 (16:00 -0500)]
zebra: Modify 'show nexthop-group rib ip|ipv6'

The zebra implementation of nexthop groups has
two types of nexthops groups currently.  Singleton
objects which have afi's and combined nexthop groups
that do not.  Specifically call this out in the code
to make this distinction.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Remove prefix pointer creation 5782/head
Donald Sharp [Thu, 6 Feb 2020 02:02:25 +0000 (21:02 -0500)]
bgpd: Remove prefix pointer creation

The creation of a prefix pointer is unnecessary.  Save the
prefix as part of the actual data structure.  This will
reduce the data needed by 8 bytes per nexthop stored.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5769 from Spantik/bugs
Donald Sharp [Fri, 7 Feb 2020 14:20:28 +0000 (09:20 -0500)]
Merge pull request #5769 from Spantik/bugs

OSPF: Multi instance broken

5 years agoOSPF: Multi instance broken 5769/head
Santosh P K [Wed, 5 Feb 2020 17:40:00 +0000 (09:40 -0800)]
OSPF: Multi instance broken

Multi instance ospf support was broken due to PR #4564.
Adding fix back and extra checks to support multi instance
OSPF.

Fixes issues #5343 & #5741

Signed-off-by: Santosh P K <sapk@vmware.com>
5 years agoMerge pull request #5735 from chiragshah6/73_evpn
Donatas Abraitis [Sun, 2 Feb 2020 16:59:05 +0000 (18:59 +0200)]
Merge pull request #5735 from chiragshah6/73_evpn

[7.3] bgpd: fix evpn route json memory leaks

5 years agoMerge pull request #5736 from opensourcerouting/move_rpm_to_python3_73
Donatas Abraitis [Wed, 29 Jan 2020 07:37:42 +0000 (09:37 +0200)]
Merge pull request #5736 from opensourcerouting/move_rpm_to_python3_73

[7.3] Move rpm to python3

5 years agobgpd: fix memory leak in evpn json outpus II 5734/head 5735/head
Chirag Shah [Mon, 27 Jan 2020 18:41:22 +0000 (10:41 -0800)]
bgpd: fix memory leak in evpn json outpus II

Two of the evpn show commands with json option has memory leak.
1) show bgp l2vpn evpn route vni all json
2) show bgp l2vpn evpn route esi json

Before fix:
----------
Executed 'show bgp l2vpn evpn route vni all json' multiple times
used ordinary blocks continue to increase.

Note at the time of show command capture there were 22 evpn routes
in vni evpn route table.

Memory statistics for bgpd:
System allocator statistics:
  Total heap allocated:  9152 KiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  7300 KiB
  Free small blocks:     1760 bytes
  Free ordinary blocks:  1852 KiB
  Ordinary blocks:       880
  Small blocks:          51
  Holding blocks:        0

Ticket:CM-27920
Reviewed By:
Testing Done:

After fix:
---------
Executed 'show bgp l2vpn evpn route vni all json' multiple times
Used ordinary blocks remains low.

Memory statistics for bgpd:
System allocator statistics:
  Total heap allocated:  8356 KiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  6492 KiB
  Free small blocks:     1840 bytes
  Free ordinary blocks:  1864 KiB
  Ordinary blocks:       939
  Small blocks:          52
  Holding blocks:        0

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobgpd: fix memory leak in evpn json outputs
Chirag Shah [Wed, 22 Jan 2020 20:22:27 +0000 (12:22 -0800)]
bgpd: fix memory leak in evpn json outputs

Found memory leak in json output of evpn's route
commands.

After executing 'show bgp l2vpn evpn route type prefix json'
and 'show bgp l2vpn evpn route type macip json' few times
(6 times) with more than 600 routes in total seeing
memory footprint for bgpd continue to grow.

Memory statistics for bgpd:
System allocator statistics:
  Total heap allocated:  12 MiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  8390 KiB
  Free small blocks:     1760 bytes
  Free ordinary blocks:  3762 KiB
  Ordinary blocks:       1161
  Small blocks:          51
  Holding blocks:        0

Ticket:CM-27920
Testing Done:

After fix:
excute few times,
'show bgp l2vpn evpn route type prefix json'
and 'show bgp l2vpn evpn route type macip json'
commands where used ordinary blocks (uordblks) is
in steady state.

Memory statistics for bgpd:
System allocator statistics:
  Total heap allocated:  9968 KiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  6486 KiB
  Free small blocks:     1984 bytes
  Free ordinary blocks:  3482 KiB
  Ordinary blocks:       1110
  Small blocks:          54
  Holding blocks:        0

Memory statistics for bgpd:
System allocator statistics:
  Total heap allocated:  10100 KiB
  Holding block headers: 0 bytes
  Used small blocks:     0 bytes
  Used ordinary blocks:  6488 KiB
  Free small blocks:     1984 bytes
  Free ordinary blocks:  3612 KiB
  Ordinary blocks:       1113
  Small blocks:          54
  Holding blocks:        0

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agodoc: Update RedHat packaging description to use Python 3 5736/head
Martin Winter [Sat, 25 Jan 2020 22:00:47 +0000 (23:00 +0100)]
doc: Update RedHat packaging description to use Python 3

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agoredhat: Update frr.spec.in to move all systems to Python3 except CentOS 6
Martin Winter [Fri, 24 Jan 2020 23:44:34 +0000 (00:44 +0100)]
redhat: Update frr.spec.in to move all systems to Python3 except CentOS 6

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agotools: Update generate_support_bundle.py to support Python 3
Martin Winter [Fri, 24 Jan 2020 23:43:20 +0000 (00:43 +0100)]
tools: Update generate_support_bundle.py to support Python 3

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agoMerge pull request #5730 from opensourcerouting/73_fix_centos6
Donatas Abraitis [Sat, 25 Jan 2020 03:02:22 +0000 (05:02 +0200)]
Merge pull request #5730 from opensourcerouting/73_fix_centos6

lib: Fix missing __be16 typedef on CentOS6

5 years agolib: Fix missing __be16 typedef on CentOS6 5730/head
Martin Winter [Mon, 20 Jan 2020 14:40:49 +0000 (15:40 +0100)]
lib: Fix missing __be16 typedef on CentOS6

Need to include linux/types.h on older Linux

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agoMerge pull request #5723 from donaldsharp/73_onlink_loss
Donatas Abraitis [Fri, 24 Jan 2020 16:24:08 +0000 (18:24 +0200)]
Merge pull request #5723 from donaldsharp/73_onlink_loss

73 onlink loss

5 years agodoc: Update ospf unnumbered documentation 5723/head
Donald Sharp [Thu, 23 Jan 2020 02:46:46 +0000 (21:46 -0500)]
doc: Update ospf unnumbered documentation

Update the ospf unnumbered documentation to reflect how
to get it working under linux.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotests: Test ospf unnumbered behavior and ensure that it works
Donald Sharp [Mon, 20 Jan 2020 19:49:03 +0000 (14:49 -0500)]
tests: Test ospf unnumbered behavior and ensure that it works

Recent commit: 0eb97b860dc94329cf9add9f8f3d3a2c7f539568

Broke onlink behavior and as a result ospf unnumbered failed
to work.  This commit adds a small test to create 2 ospf routers,
connect them through ospf unlinked behavior and then ensure
that the routes are installed into the kernel as expected.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Re-add onlink flag due to loss in earlier commit
Donald Sharp [Mon, 20 Jan 2020 21:53:34 +0000 (16:53 -0500)]
zebra: Re-add onlink flag due to loss in earlier commit

commit: 0eb97b860dc94329cf9add9f8f3d3a2c7f539568

Removed this chunk of code in zebra:
-       if (ifp)
-               if (connected_is_unnumbered(ifp))
-                       SET_FLAG(nexthop->flags, NEXTHOP_FLAG_ONLINK);

Effectively if we had a NEXTHOP_TYPE_IPV4_IFINDEX we would
auto set the onlink flag.  This commit dropped it for some reason.

Add it back in an intelligent manner.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5720 from mjstapp/fix_nh_debug_show_7_3
Donatas Abraitis [Thu, 23 Jan 2020 09:06:38 +0000 (11:06 +0200)]
Merge pull request #5720 from mjstapp/fix_nh_debug_show_7_3

zebra: [7.3] include zebra nexthop debug in show run

5 years agozebra: include zebra nexthop debug in show run 5720/head
Mark Stapp [Wed, 22 Jan 2020 15:00:41 +0000 (10:00 -0500)]
zebra: include zebra nexthop debug in show run

[7.3 version] Add show output for 'debug zebra nexthop [detail]'
category.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #5708 from donaldsharp/nexthop_encoding_73
Donatas Abraitis [Sun, 19 Jan 2020 07:13:33 +0000 (09:13 +0200)]
Merge pull request #5708 from donaldsharp/nexthop_encoding_73

[7.3]lib: Fix nexthop encoding

5 years agolib: Fix nexthop encoding 5708/head
Donald Sharp [Sat, 18 Jan 2020 14:25:38 +0000 (09:25 -0500)]
lib: Fix nexthop encoding

Commit
68a02e06e5f103048d947262c08c569056f74d1c broke nexthop encoding
for nexthop tracking.

This code combined the different types of nexthop encoding
being done in the zapi protocol.  What was missed that
resolved nexthops of type NEXTHOP_TYPE_IPV4|6 have an ifindex
value that was not being reported.  This commit ensures
that we always send this data( even if it is 0).

The following test commit will ensure that this stays working
as is expected by an upper level protocol.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5690 from ton31337/fix/addpath_adj_out_look_compare_id_7.3
Donald Sharp [Thu, 16 Jan 2020 12:18:23 +0000 (07:18 -0500)]
Merge pull request #5690 from ton31337/fix/addpath_adj_out_look_compare_id_7.3

bgpd: [7.3] add addpath ID to adj_out tree sort

5 years agoMerge pull request #5688 from sworleys/dev-7.3-NHG-Fixes
David Lamparter [Thu, 16 Jan 2020 09:18:07 +0000 (10:18 +0100)]
Merge pull request #5688 from sworleys/dev-7.3-NHG-Fixes

[7.3] NHG Crash/Resolution Fixes

5 years agobgpd: add addpath ID to adj_out tree sort 5690/head
Mitchell Skiba [Thu, 9 Jan 2020 19:46:13 +0000 (11:46 -0800)]
bgpd: add addpath ID to adj_out tree sort

When withdrawing addpaths, adj_lookup was called to find the path that
needed to be withdrawn. It would lookup in the RB tree based on subgroup
pointer alone, often find the path with the wrong addpath ID, and return
null.  Only the path highest in the tree sent to the subgroup could be
found, thus withdrawn.

Adding the addpath ID to the sort criteria for the RB tree allows us to
simplify the logic for adj_lookup, and address this problem. We are able
to remove the logic around non-addpath subgroups because the addpath ID
is consistently 0 for non-addpath adj_outs, so special logic to skip
matching the addpath ID isn't required.  (As a side note, addpath will
also never use ID 0, so there won't be any ambiguity when looking at the
structure content.)

Signed-off-by: Mitchell Skiba <mskiba@amazon.com>
5 years agozebra: can't improve efficiency for recursive depends 5688/head
Stephen Worley [Tue, 31 Dec 2019 17:10:58 +0000 (12:10 -0500)]
zebra: can't improve efficiency for recursive depends

cb86eba3ab3d82f540bdb9ed5f65d361ca301ea8 was causing zebra to crash
when handling a nexthop group that had a nexthop which was recursively resolved.

Steps to recreate:

!
nexthop-group red
 nexthop 1.1.1.1
 nexthop 1.1.1.2
!

sharp install routes 8.8.8.1 nexthop-group red 1

=========================================
==11898== Invalid write of size 8
==11898==    at 0x48E53B4: _nexthop_add_sorted (nexthop_group.c:254)
==11898==    by 0x48E5336: nexthop_group_add_sorted (nexthop_group.c:296)
==11898==    by 0x453593: handle_recursive_depend (zebra_nhg.c:481)
==11898==    by 0x451CA8: zebra_nhg_find (zebra_nhg.c:572)
==11898==    by 0x4530FB: zebra_nhg_find_nexthop (zebra_nhg.c:597)
==11898==    by 0x4536B4: depends_find (zebra_nhg.c:1065)
==11898==    by 0x453526: depends_find_add (zebra_nhg.c:1087)
==11898==    by 0x451C4D: zebra_nhg_find (zebra_nhg.c:567)
==11898==    by 0x4519DE: zebra_nhg_rib_find (zebra_nhg.c:1126)
==11898==    by 0x452268: nexthop_active_update (zebra_nhg.c:1729)
==11898==    by 0x461517: rib_process (zebra_rib.c:1049)
==11898==    by 0x4610C8: process_subq_route (zebra_rib.c:1967)
==11898==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

Zebra crashes because we weren't handling the case of the depend nexthop
being recursive.

For this case, we cannot make the function more efficient. A nexthop
could resolve to a group of any size, thus we need allocs/frees.

To solve this and retain the goal of the original patch, we separate out the
two cases so it will still be more efficient if the nexthop is not recursive.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit 0fff714efa1959f48c8e1d88e88968d15c1ffe78)

5 years agozebra: just set nexthop member in handle_recursive_depend()
Stephen Worley [Fri, 3 Jan 2020 17:35:15 +0000 (12:35 -0500)]
zebra: just set nexthop member in handle_recursive_depend()

With recent changes to the lib nexthop_group
APIs (e1f3a8eb193267da195088cc515b598ae5a92a12), we are making
new assumptions that this should be adding a single nexthop
to a group, not a list of nexthops.

This broke the case of a recursive nexthop resolving to a group:

```
D>  2.2.2.1/32 [150/0] via 1.1.1.1 (recursive), 00:00:09
  *                      via 1.1.1.1, dummy1 onlink, 00:00:09
                       via 1.1.1.2 (recursive), 00:00:09
  *                      via 1.1.1.2, dummy2 onlink, 00:00:09
D>  3.3.3.1/32 [150/0] via 2.2.2.1 (recursive), 00:00:04
  *                      via 1.1.1.1, dummy1 onlink, 00:00:04
K * 10.0.0.0/8 [0/1] via 172.27.227.148, tun0, 00:00:21
```

This group can instead just directly point to the nh that was passed.
Its only being used for a lookup (the memory gets copied and used
elsewhere if the nexthop is not found).

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
(cherry picked from commit 1d049aba721bb05ecf2f8b5978d96863330093b6)

5 years agoMerge pull request #5684 from opensourcerouting/7.3/manpage-rename
Donatas Abraitis [Wed, 15 Jan 2020 19:46:52 +0000 (21:46 +0200)]
Merge pull request #5684 from opensourcerouting/7.3/manpage-rename

[7.3] doc: manpage rename

5 years agoospfclient: don't install man page 5684/head
David Lamparter [Wed, 15 Jan 2020 11:22:26 +0000 (12:22 +0100)]
ospfclient: don't install man page

... we're not installing ospfclient (it's a demo/example program), so
installing the man page is quite useless.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodoc: rename man pages to frr-*
David Lamparter [Tue, 14 Jan 2020 23:00:32 +0000 (00:00 +0100)]
doc: rename man pages to frr-*

The vrrpd one conflicts with the standalone vrrpd package; also we're
installing daemons to /usr/lib/frr on some systems so they're not on
PATH.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #5683 from donaldsharp/bfd_msg_7.3
David Lamparter [Wed, 15 Jan 2020 16:08:09 +0000 (17:08 +0100)]
Merge pull request #5683 from donaldsharp/bfd_msg_7.3

[7.3]zebra: bfd message handling cleanup foo

5 years agozebra: bfd message handling cleanup foo 5682/head 5683/head
Quentin Young [Tue, 14 Jan 2020 18:55:55 +0000 (13:55 -0500)]
zebra: bfd message handling cleanup foo

Previous patches introduced various issues:
- Removal of stream_free() to fix double free caused memleak
- Patch for memleak was incomplete

This should fix it hopefully.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #5663 from donaldsharp/nhg_topotests_fixes base_7.3
Mark Stapp [Fri, 10 Jan 2020 23:19:23 +0000 (18:19 -0500)]
Merge pull request #5663 from donaldsharp/nhg_topotests_fixes

Nhg topotests fixes

5 years agoMerge pull request #5662 from qlyoung/fix-ptm-bfd-deregister-memleak
Mark Stapp [Fri, 10 Jan 2020 21:59:20 +0000 (16:59 -0500)]
Merge pull request #5662 from qlyoung/fix-ptm-bfd-deregister-memleak

zebra: fix bfd deregister message memleak

5 years agozebra: Actually add the NLA_F_NESTED flag to our code 5663/head
Donald Sharp [Fri, 10 Jan 2020 20:13:36 +0000 (15:13 -0500)]
zebra: Actually add the NLA_F_NESTED flag to our code

The existing usage of the rta_nest and addattr_nest
functions were not adding the NLA_F_NESTED flag
to the type.  As such the new nexthop functionality was
actually looking for this flag, while apparently older
code did not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5661 from ton31337/fix/doc_for_redhat
Quentin Young [Fri, 10 Jan 2020 18:44:21 +0000 (13:44 -0500)]
Merge pull request #5661 from ton31337/fix/doc_for_redhat

doc: Replace wrong paths for centos/fedora source build instructions

5 years agotests: ospf6-topo1 did not work properly with nhg's and 5.3 kernels
Donald Sharp [Fri, 10 Jan 2020 13:57:18 +0000 (08:57 -0500)]
tests: ospf6-topo1 did not work properly with nhg's and 5.3 kernels

Fix the ospf6-topo1 test to understand nhg's and what happens
when they are installed into a kernel that can support them.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5609 from kooky/fix_log
Quentin Young [Fri, 10 Jan 2020 01:55:05 +0000 (20:55 -0500)]
Merge pull request #5609 from kooky/fix_log

Fix logrotate in debian for bfdd, pbrd and vrrpd.

5 years agodebian: Fix logrotate in debian for bfdd, pbrd and vrrpd. 5609/head
Tim Bray [Thu, 2 Jan 2020 20:00:07 +0000 (20:00 +0000)]
debian: Fix logrotate in debian for bfdd, pbrd and vrrpd.

Signed-off-by: Tim Bray <tim@kooky.org>
5 years agozebra: fix bfd deregister message memleak 5662/head
Quentin Young [Thu, 9 Jan 2020 23:50:18 +0000 (18:50 -0500)]
zebra: fix bfd deregister message memleak

Removing double frees accidentally introduced a memleak

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: Replace wrong paths for centos/fedora source build instructions 5661/head
Donatas Abraitis [Thu, 9 Jan 2020 22:11:09 +0000 (00:11 +0200)]
doc: Replace wrong paths for centos/fedora source build instructions

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #5410 from ton31337/feature/bgp_default-route_with_route-map_set
Donald Sharp [Thu, 9 Jan 2020 13:39:32 +0000 (08:39 -0500)]
Merge pull request #5410 from ton31337/feature/bgp_default-route_with_route-map_set

bgpd: An ability to set attributes for default-originate via route-map

5 years agoMerge pull request #5560 from sworleys/Pim-Vrf-Hang-3
Mark Stapp [Wed, 8 Jan 2020 20:14:40 +0000 (15:14 -0500)]
Merge pull request #5560 from sworleys/Pim-Vrf-Hang-3

lib,zebra: add zapi msg top level error handling

5 years agoMerge pull request #5418 from qlyoung/fix-bgp-prefix-sid-missing-boundscheck
Donatas Abraitis [Wed, 8 Jan 2020 19:59:07 +0000 (21:59 +0200)]
Merge pull request #5418 from qlyoung/fix-bgp-prefix-sid-missing-boundscheck

bgpd: fix missing bounds checks for psid attr

5 years agopimd: lookup nh using vrf_id we checked before 5560/head
Stephen Worley [Mon, 16 Dec 2019 22:40:41 +0000 (17:40 -0500)]
pimd: lookup nh using vrf_id we checked before

Update zclient_lookup_nexthop_once() to create the zapi
header using the vrf_id on the pim->vrf struct.

This is the one we do a check on a couple lines before, so
we should be using it when we actually create the header as
well.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agopimd: allow pimd to handle nexthop_lookup zapi error
Stephen Worley [Fri, 13 Dec 2019 01:14:51 +0000 (20:14 -0500)]
pimd: allow pimd to handle nexthop_lookup zapi error

Allow pimd to stop the lookup if zebra tells pimd that the
lookup failed due to a zapi error. Otherwise, it will keep
waiting for a nexthop message that will never come.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agolib,zebra: add zapi msg top level error handling
Stephen Worley [Tue, 17 Dec 2019 22:00:52 +0000 (17:00 -0500)]
lib,zebra: add zapi msg top level error handling

Add error handling for top level failures (not able to
execute command, unable to find vrf for command, etc.)

With this error handling we add a new zapi message type
of ZEBRA_ERROR used when we are unable to properly handle
a zapi command and pass it down into the lower level code.

In the event of this, we reply with a message of type
enum zebra_error_types containing the error type.

The sent packet will look like so:

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Length            |     Marker    |    Version    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             VRF ID                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Command            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            ERROR TYPE         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Also add appropriate hooks for clients to subscribe to for
handling these types of errors.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #5551 from mjstapp/fix_zebra_show_nhg
Donald Sharp [Wed, 8 Jan 2020 16:54:01 +0000 (11:54 -0500)]
Merge pull request #5551 from mjstapp/fix_zebra_show_nhg

zebra: make current show nexthop-group cli zebra-specific

5 years agozebra: make current show nexthop-group cli zebra-specific 5551/head
Mark Stapp [Tue, 17 Dec 2019 16:31:17 +0000 (11:31 -0500)]
zebra: make current show nexthop-group cli zebra-specific

There's confusion between the nexthop-group configuration and a
zebra-specific show command. For now, make the zebra show
command string RIB-specific until we're able to unify these
paths.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #5260 from donaldsharp/evpn_mac_daddy
Donatas Abraitis [Wed, 8 Jan 2020 06:59:51 +0000 (08:59 +0200)]
Merge pull request #5260 from donaldsharp/evpn_mac_daddy

bgpd: Prevent usage after free in bgp_mac.c

5 years agoMerge pull request #5314 from qlyoung/yang-vrrp
Renato Westphal [Wed, 8 Jan 2020 00:36:46 +0000 (21:36 -0300)]
Merge pull request #5314 from qlyoung/yang-vrrp

VRRP northbound conversion

5 years agoMerge pull request #5650 from qlyoung/fix-cast-malloc
Mark Stapp [Tue, 7 Jan 2020 21:46:29 +0000 (16:46 -0500)]
Merge pull request #5650 from qlyoung/fix-cast-malloc

zebra: remove cast from l3vni XMALLOC

5 years agoMerge pull request #5624 from qlyoung/fix-zebra-ptm-buffer-overrun
Rafael Zalamena [Tue, 7 Jan 2020 20:02:07 +0000 (17:02 -0300)]
Merge pull request #5624 from qlyoung/fix-zebra-ptm-buffer-overrun

Fix PTM ZAPI stream parsing

5 years agoMerge pull request #5646 from Spantik/bgp_unalign
Donald Sharp [Tue, 7 Jan 2020 19:35:59 +0000 (14:35 -0500)]
Merge pull request #5646 from Spantik/bgp_unalign

bgpd: fix unaligned access to addpath id

5 years agozebra: remove cast from l3vni XMALLOC 5650/head
Quentin Young [Tue, 7 Jan 2020 18:54:04 +0000 (13:54 -0500)]
zebra: remove cast from l3vni XMALLOC

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #5617 from donaldsharp/zebra_bites
Mark Stapp [Tue, 7 Jan 2020 18:41:03 +0000 (13:41 -0500)]
Merge pull request #5617 from donaldsharp/zebra_bites

zebra: misc zebra cleanups

5 years agoMerge pull request #5639 from qlyoung/fix-zebra-ptm-double-free
Mark Stapp [Tue, 7 Jan 2020 16:20:22 +0000 (11:20 -0500)]
Merge pull request #5639 from qlyoung/fix-zebra-ptm-double-free

zebra: fix ptm heap double free

5 years agoMerge pull request #5628 from donaldsharp/rtm_getneigh
Russ White [Tue, 7 Jan 2020 15:47:50 +0000 (10:47 -0500)]
Merge pull request #5628 from donaldsharp/rtm_getneigh

zebra: Ignore RTM_GETNEIGH messages from the linux kernel

5 years agobgpd: fix unaligned access to addpath id 5646/head
Santosh P K [Tue, 7 Jan 2020 15:47:13 +0000 (07:47 -0800)]
bgpd: fix unaligned access to addpath id

uint8_t * cannot be cast to uint32_t * unless the
pointed-to address is aligned according to uint32_t's
alignment rules. And it usually is not.

Signed-off-by: Santosh P K <sapk@vmware.com>
5 years agoMerge pull request #5634 from chiragshah6/evpn_dev2
Russ White [Tue, 7 Jan 2020 15:45:30 +0000 (10:45 -0500)]
Merge pull request #5634 from chiragshah6/evpn_dev2

bgpd: fix advertise pip running config

5 years agoMerge pull request #5644 from donaldsharp/more_pim_doc
Russ White [Tue, 7 Jan 2020 15:34:01 +0000 (10:34 -0500)]
Merge pull request #5644 from donaldsharp/more_pim_doc

doc: Clarify what is supported directly in PIM documentation

5 years agodoc: Clarify what is supported directly in PIM documentation 5644/head
Donald Sharp [Tue, 7 Jan 2020 14:03:08 +0000 (09:03 -0500)]
doc: Clarify what is supported directly in PIM documentation

The FRR community keeps getting asked about what is supported or not.
Try to clarify in an additional spot what is and what is not supported.
Where people interested in using PIM might have a chance at actually
seeing the notification.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5638 from qlyoung/fix-bgp-cluster-list-null-memcmp
Donatas Abraitis [Tue, 7 Jan 2020 08:54:31 +0000 (10:54 +0200)]
Merge pull request #5638 from qlyoung/fix-bgp-cluster-list-null-memcmp

bgpd: avoid memcmp(NULL, NULL)

5 years agoMerge pull request #5635 from donaldsharp/debian_build
Donatas Abraitis [Tue, 7 Jan 2020 08:47:41 +0000 (10:47 +0200)]
Merge pull request #5635 from donaldsharp/debian_build

debian: Fix spelling error

5 years agoMerge pull request #5636 from qlyoung/fix-bgp-unaligned-addpath-id-pointer
Donatas Abraitis [Tue, 7 Jan 2020 08:47:16 +0000 (10:47 +0200)]
Merge pull request #5636 from qlyoung/fix-bgp-unaligned-addpath-id-pointer

bgpd: fix unaligned access to addpath id