]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agolib,zebra: remove unused MATCHED nexthop flag
Mark Stapp [Tue, 11 Feb 2020 16:14:37 +0000 (11:14 -0500)]
lib,zebra: remove unused MATCHED nexthop flag

Remove an unused flag value from the nexthop struct.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #5717 from pguibert6WIND/flowspec_issue_redistribute
Quentin Young [Tue, 4 Feb 2020 20:48:24 +0000 (15:48 -0500)]
Merge pull request #5717 from pguibert6WIND/flowspec_issue_redistribute

Flowspec issue redistribute

4 years agoMerge pull request #5759 from ton31337/fix/void_no_return
Quentin Young [Tue, 4 Feb 2020 20:45:01 +0000 (15:45 -0500)]
Merge pull request #5759 from ton31337/fix/void_no_return

zebra, lib: Remove return from void functions

4 years agotools: Add coccinelle script to check if void does not have return
Donatas Abraitis [Tue, 4 Feb 2020 18:05:40 +0000 (20:05 +0200)]
tools: Add coccinelle script to check if void does not have return

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agozebra, lib: Remove return from void functions
Donatas Abraitis [Tue, 4 Feb 2020 18:05:21 +0000 (20:05 +0200)]
zebra, lib: Remove return from void functions

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5169 from ton31337/feature/sequence_numbers_for_community_lists
Quentin Young [Tue, 4 Feb 2020 16:56:29 +0000 (11:56 -0500)]
Merge pull request #5169 from ton31337/feature/sequence_numbers_for_community_lists

bgpd: Use sequence numbers for community lists

4 years agobgpd: forge bgp flowspec packets to be sent
Philippe Guibert [Tue, 21 Jan 2020 12:17:45 +0000 (13:17 +0100)]
bgpd: forge bgp flowspec packets to be sent

bgp flowspec packets are being forged correctly. There is no need to
check for bgp length, as the bgp nlri length is checked at reception.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agobgpd: when nexthop IP is available for flowspec, keep it
Philippe Guibert [Tue, 21 Jan 2020 12:15:42 +0000 (13:15 +0100)]
bgpd: when nexthop IP is available for flowspec, keep it

keep original nexthop IP address when propagating bgp updates to other
peers.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agoMerge pull request #5739 from mjstapp/nhg_show_ordered
Renato Westphal [Tue, 4 Feb 2020 16:37:24 +0000 (13:37 -0300)]
Merge pull request #5739 from mjstapp/nhg_show_ordered

zebra: show zebra nexthop-groups without copying

4 years agoMerge pull request #5653 from slankdev/slankdev-bgpd-support-prefix-sid-srv6-l3vpn
Donald Sharp [Tue, 4 Feb 2020 16:37:10 +0000 (11:37 -0500)]
Merge pull request #5653 from slankdev/slankdev-bgpd-support-prefix-sid-srv6-l3vpn

bgpd: additional Prefix-SID sub-types for supporting SRv6 l3vpn

4 years agoMerge pull request #5746 from donaldsharp/bgp_sa
Russ White [Tue, 4 Feb 2020 16:24:08 +0000 (11:24 -0500)]
Merge pull request #5746 from donaldsharp/bgp_sa

Coverioty sa stuff

4 years agoMerge pull request #5207 from Spantik/ZERBA_GR
Donald Sharp [Tue, 4 Feb 2020 15:57:29 +0000 (10:57 -0500)]
Merge pull request #5207 from Spantik/ZERBA_GR

Zebra: Adding GR infrastructure for clients.

4 years agozebra: show zebra nexthop-groups without copying
Mark Stapp [Tue, 28 Jan 2020 19:45:53 +0000 (14:45 -0500)]
zebra: show zebra nexthop-groups without copying

Use a hash walker/iterator instead of a temporary list to
show zebra's nexthop-groups/nexthop-hash-entries.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #5737 from mjstapp/zebra_disable_kern_nhs
Russ White [Tue, 4 Feb 2020 13:12:34 +0000 (08:12 -0500)]
Merge pull request #5737 from mjstapp/zebra_disable_kern_nhs

zebra: add config to disable use of kernel nexthops

4 years agozebra: top has already been derefed
Donald Sharp [Fri, 31 Jan 2020 15:46:05 +0000 (10:46 -0500)]
zebra: top has already been derefed

The top variable has already been derefed by the time we get
to the test to see if it is non-NULL.  No need to check it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Test return of fcntl in agentx.c
Donald Sharp [Fri, 31 Jan 2020 15:44:23 +0000 (10:44 -0500)]
lib: Test return of fcntl in agentx.c

The agentx.c code was calling fcntl but not testing return
code and handling it, thus making SA unhappy.

Fix.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Remove dead call to get_afi_safi_str
Donald Sharp [Fri, 31 Jan 2020 15:30:22 +0000 (10:30 -0500)]
bgpd: Remove dead call to get_afi_safi_str

There is no need for a call into get_afi_safi_str for the
json side since we add it based upon the afi safi str below.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Tell Coverity SA that regex cannot be NULL here
Donald Sharp [Fri, 31 Jan 2020 15:26:33 +0000 (10:26 -0500)]
bgpd: Tell Coverity SA that regex cannot be NULL here

The coverity SA believes that the regex value can possibly
be NULL.  Not possible so let's make it happy.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5745 from donaldsharp/bgp_formating
Donatas Abraitis [Sun, 2 Feb 2020 13:37:44 +0000 (15:37 +0200)]
Merge pull request #5745 from donaldsharp/bgp_formating

Bgp formating

4 years agoMerge pull request #5669 from donaldsharp/nhg_ip
Mark Stapp [Fri, 31 Jan 2020 16:35:22 +0000 (11:35 -0500)]
Merge pull request #5669 from donaldsharp/nhg_ip

Nhg ip cleanups

4 years agobgpd: enums in switches do not need default
Donald Sharp [Fri, 31 Jan 2020 14:24:58 +0000 (09:24 -0500)]
bgpd: enums in switches do not need default

If you have enums handled in a switch adding a default case
makes it fun to fix when new stuff is added later.  Remove.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Cleanup some bad formating
Donald Sharp [Fri, 31 Jan 2020 14:19:24 +0000 (09:19 -0500)]
bgpd: Cleanup some bad formating

Some recent commits got some bad formating.  Clean this up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: Update doc to reflect changes in `show nexthop-group rib` command
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>
4 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>
4 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>
4 years agoMerge pull request #5637 from sworleys/NHG-Zapi-Fuzz
Mark Stapp [Fri, 31 Jan 2020 13:21:36 +0000 (08:21 -0500)]
Merge pull request #5637 from sworleys/NHG-Zapi-Fuzz

Zebra nhg/nexthop fixes

4 years agozebra: Capabality and stale route handling for GR client.
Santosh P K [Thu, 9 Jan 2020 17:53:27 +0000 (09:53 -0800)]
zebra: Capabality and stale route handling for GR client.

Handling capability received from client. It may contain
GR enable/disable, Stale time changes, RIB update complete
for given AFi, ASAFI and instance. It also has changes for
stale route handling.

Signed-off-by: Santosh P K <sapk@vmware.com>
4 years agozebra: add null check before connecting recursive depend
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>
4 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>
4 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>
4 years agozebra: Handling of connection disconnect and connect with GR.
Santosh P K [Thu, 9 Jan 2020 16:39:50 +0000 (08:39 -0800)]
zebra: Handling of connection disconnect and connect with GR.

Zebra will have special handling for clients with GR enabled.
When client disconnects with GR enabled, then a stale client
will be created and its RIB will be retained till stale timer
or client comes up and updated its RIB.

Co-authored-by: Santosh P K <sapk@vmware.com>
Co-authored-by: Soman K S <somanks@vmware.com>
Signed-off-by: Santosh P K <sapk@vmware.com>
4 years agozebra: Header file changes and show commands.
Santosh P K [Tue, 22 Oct 2019 14:01:58 +0000 (07:01 -0700)]
zebra: Header file changes and show commands.

Adding header files changes where structure to hold
received graceful restart info from client is defined.
Also there are changes for show commands where exisiting
commands are extended.

Co-authored-by: Santosh P K <sapk@vmware.com>
Co-authored-by: Soman K S <somanks@vmware.com>
Signed-off-by: Santosh P K <sapk@vmware.com>
4 years agolib: Adding GR capabilites encode and decode.
Santosh P K [Wed, 29 Jan 2020 06:50:27 +0000 (22:50 -0800)]
lib: Adding GR capabilites encode and decode.

For Graceful restart clients have to send GR capabilities
library functions are added to encode capabilities and
also for zebra to decode client capabilities.

Co-authored-by: Santosh P K <sapk@vmware.com>
Co-authored-by: Soman K S <somanks@vmware.com>
Signed-off-by: Santosh P K <sapk@vmware.com>
4 years agoMerge pull request #5210 from bisdhdh/master
Russ White [Tue, 28 Jan 2020 16:47:09 +0000 (11:47 -0500)]
Merge pull request #5210 from bisdhdh/master

bgpd:BGP Graceful Restart Per Neighbor(BGPN) Feature.

4 years agoMerge pull request #4773 from thozza/31-prefix-bcast-addr
Russ White [Tue, 28 Jan 2020 16:42:45 +0000 (11:42 -0500)]
Merge pull request #4773 from thozza/31-prefix-bcast-addr

ipv4_broadcast_addr() didn't comply with RFC3021

4 years agoMerge pull request #5721 from mjstapp/vty_copy_to_runn
Russ White [Tue, 28 Jan 2020 16:31:25 +0000 (11:31 -0500)]
Merge pull request #5721 from mjstapp/vty_copy_to_runn

vtysh: add a cli that reads a file into running-config

4 years agozebra: add config to disable use of kernel nexthops
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>
4 years agoMerge pull request #5706 from mjstapp/fix_nh_debug_show
Russ White [Tue, 28 Jan 2020 15:27:43 +0000 (10:27 -0500)]
Merge pull request #5706 from mjstapp/fix_nh_debug_show

zebra: include zebra nexthop debug in show runn

4 years agoMerge pull request #5716 from opensourcerouting/bfdd-log
Russ White [Tue, 28 Jan 2020 15:25:56 +0000 (10:25 -0500)]
Merge pull request #5716 from opensourcerouting/bfdd-log

bfdd: remove logging shim & fix warnings

4 years agoMerge pull request #5725 from ton31337/feature/doc_for_set_metric_increment_decrement
Russ White [Tue, 28 Jan 2020 15:06:43 +0000 (10:06 -0500)]
Merge pull request #5725 from ton31337/feature/doc_for_set_metric_increment_decrement

doc: Add documentation about OSPF(6) `set metric [+|-]metric` cmd

4 years agoMerge pull request #5731 from chiragshah6/mdev
Russ White [Tue, 28 Jan 2020 15:06:03 +0000 (10:06 -0500)]
Merge pull request #5731 from chiragshah6/mdev

bgpd: fix memory leak in evpn json outpus II

4 years agoMerge pull request #5673 from qlyoung/fix-zebra-ipset-iptable-memleak-on-disconnect
Donatas Abraitis [Tue, 28 Jan 2020 13:40:35 +0000 (15:40 +0200)]
Merge pull request #5673 from qlyoung/fix-zebra-ipset-iptable-memleak-on-disconnect

zebra: fix ipset, iptable, ipset entry memleaks

4 years agoMerge pull request #5728 from opensourcerouting/move_rpm_to_python3
Donatas Abraitis [Tue, 28 Jan 2020 08:40:08 +0000 (10:40 +0200)]
Merge pull request #5728 from opensourcerouting/move_rpm_to_python3

Move rpm to python3

4 years agobgpd: fix memory leak in evpn json outpus II
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>
4 years agoMerge pull request #5727 from chiragshah6/mdev
Donatas Abraitis [Mon, 27 Jan 2020 07:12:44 +0000 (09:12 +0200)]
Merge pull request #5727 from chiragshah6/mdev

bgpd: fix memory leak in evpn json outputs

4 years agodoc: Update RedHat packaging description to use Python 3
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>
4 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>
4 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>
4 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>
4 years agodoc: Add documentation about OSPF(6) `set metric [+|-]metric` cmd
Donatas Abraitis [Fri, 24 Jan 2020 12:11:02 +0000 (14:11 +0200)]
doc: Add documentation about OSPF(6) `set metric [+|-]metric` cmd

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agovtysh: add a cli that reads a file into running-config
Mark Stapp [Thu, 23 Jan 2020 15:17:40 +0000 (10:17 -0500)]
vtysh: add a cli that reads a file into running-config

Add a 'copy' cli that reads a file into the current running
config. Add an entry about the new cli to the user doc.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #5620 from qlyoung/fix-zebra-vrf-label-afi-check
Mark Stapp [Thu, 23 Jan 2020 15:59:19 +0000 (10:59 -0500)]
Merge pull request #5620 from qlyoung/fix-zebra-vrf-label-afi-check

Fix zebra vrf label afi check

4 years agoMerge pull request #5711 from donaldsharp/onlink_loss
Mark Stapp [Thu, 23 Jan 2020 15:50:01 +0000 (10:50 -0500)]
Merge pull request #5711 from donaldsharp/onlink_loss

zebra: Re-add onlink flag due to loss in earlier commit

4 years agobgpd: Added bgp graceful restart additional debug logs.
bisdhdh [Sun, 1 Dec 2019 05:22:06 +0000 (10:52 +0530)]
bgpd: Added bgp graceful restart additional debug logs.

bgp graceful restart additional debug logs, resolved
merge conflicts.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: BGP Garaceful Restart debug logs.
bisdhdh [Mon, 25 Nov 2019 15:18:15 +0000 (20:48 +0530)]
bgpd: BGP Garaceful Restart debug logs.

Reorganizing bgp gr debug logs and code review comments.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: BGP Graceful Restart documentation.
bisdhdh [Fri, 22 Nov 2019 12:29:01 +0000 (17:59 +0530)]
bgpd: BGP Graceful Restart documentation.

This change list contains the documentation of BGP Greacful Restart
feature and all the commnads to enable/disable the feature

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Adding bgp peer route processing and EOR state Signalling from BGPD to Zebra.
bisdhdh [Sat, 26 Oct 2019 16:40:33 +0000 (22:10 +0530)]
bgpd: Adding bgp peer route processing and EOR state Signalling from BGPD to Zebra.

* While the Deferral timer is running, signal route update pending
(ZEBRA_CLIENT_ROUTE_UPDATE_PENDING) from BGPD to Zebra.
* After expiry of the Deferral timer, the deferred routes are processed.
When the deferred route_list becomes empty, End-of-Rib is send to the
peer and route processing complete message (ZEBRA_CLIENT_ROUTE_UPDATE_COMPLETE)
is sent to Zebra. So that Zebra would delete any stale routes still
present in the rib.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Add rib-stale-time(running in Zebra).
bisdhdh [Fri, 25 Oct 2019 20:20:27 +0000 (01:50 +0530)]
bgpd: Add rib-stale-time(running in Zebra).

* Added CLI commands to update rib-stale-time, running in
Cmd : "bgp gaceful-restart rib-stale-time (1-3000)".
Cmd : "no bgp gaceful-restart rib-stale-time".
* Integrating the hooks function for signalling from BGPD
to ZEBRA to ZEBRA to enable or disable GR feature in ZEBRA
depending on bgp per peer gr configuration.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Adding helper caller hooks for BGPD-ZEBRA integration for GR.
bisdhdh [Fri, 25 Oct 2019 19:58:45 +0000 (01:28 +0530)]
bgpd: Adding helper caller hooks for BGPD-ZEBRA integration for GR.

*Adding helper caller hooks function for signalling from BGPD
to ZEBRA to enable or disable GR feature in ZEBRA depending
on bgp per peer gr configuration.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Adding helper function for BGPD-ZEBRA integration for GR.
bisdhdh [Fri, 25 Oct 2019 19:23:52 +0000 (00:53 +0530)]
bgpd: Adding helper function for BGPD-ZEBRA integration for GR.

*Adding helper function for signalling from BGPD to ZEBRA to
enable or disable GR feature in ZEBRA depending on bgp per
peer gr configuration.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Zebra lib for Graceful Restart.
bisdhdh [Fri, 25 Oct 2019 18:58:57 +0000 (00:28 +0530)]
bgpd: Zebra lib for Graceful Restart.

These changes are for Zebra lib in order to supportGraceful Restart
feature. These changes are addedtemporarily, until Zebra Graceful
Restart lib Pr is merged.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
Signed-off-by: Soman K S <somanks@vmware.com>
4 years agobgpd: Adding header files for BGPD-ZEBRA integration for GR.
bisdhdh [Fri, 25 Oct 2019 15:42:39 +0000 (21:12 +0530)]
bgpd: Adding header files for BGPD-ZEBRA integration for GR.

Data Structures, function declaration and Macros forSignalling
from BGPD to ZEBRA to enable or disable GR feature in ZEBRA
depending on bgp per peer gr configuration.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Restarting node does not send EOR after the convergence.
bisdhdh [Thu, 24 Oct 2019 14:59:43 +0000 (20:29 +0530)]
bgpd: Restarting node does not send EOR after the convergence.

*After a restarting router comes up and the bgp session is
successfully established with the peer. If the restarting
router doesn’t have any route to send, it send EOR to
the peer immediately before receiving updates from its peers.
*Instead the restarting router should send EOR, if the
selection deferral timer is not running OR count of eor received
and eor required are matches then send EOR.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Added hidden CLI command to disable sending of End-of-Rib.
bisdhdh [Thu, 24 Oct 2019 10:21:18 +0000 (15:51 +0530)]
bgpd: Added hidden CLI command to disable sending of End-of-Rib.

BGP disable EOR sending is a useful command for testing various
scenarios of BGP graceful restart.
* Added the hidden CLI command :  bgp graceful-restart disable-eor
* The CLI will not be displayed in "show running-config" and will not
  be stored in configuration file.
* When enabled, EOR will not be sent to peer

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
Signed-off-by: Soman K S <somanks@vmware.com>
4 years agobgpd: BGP-GR peer router restart-time should be reset.
bisdhdh [Thu, 24 Oct 2019 06:40:37 +0000 (12:10 +0530)]
bgpd: BGP-GR peer router restart-time should be reset.

When the peer router's gr mode had changed from helper/restart
to disable. The local bgp gr router should reset the peer
router's restart-time stored.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Fix for Helper node doesn't set R-bit in OPEN message after the reload.
bisdhdh [Thu, 24 Oct 2019 06:37:08 +0000 (12:07 +0530)]
bgpd: Fix for Helper node doesn't set R-bit in OPEN message after the reload.

BGP Helper node doesn't set R-bit in OPEN message after the
restart or reload of the BGP router.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: BGP tcp session failed to apply GR configuration on the transferred
bisdhdh [Thu, 24 Oct 2019 04:40:53 +0000 (10:10 +0530)]
bgpd: BGP tcp session failed to apply GR configuration on the transferred
bgp tcp connection.

When the BGP peer is configured between two bgp routes  both routers would create
peer structure , when they receive each other’s open message. In this event both
speakers, open duplicate TCP sessions and send OPEN messages on each socket
simultaneously, the BGP Identifier is used to resolve which socket should be closed.
If BGP GR is enabled the old tcp session is dumped and the new session is retained.
So while this transfer of connection is happening, if all the bgp gr config
is not migrated to the new connection, the new bgp gr mode will never get applied.
Fix Summary:
1.  Replicate GR configuration from the old session to the new session in bgp_accept().
2.  Replicate GR configuration from stub to full-fledged peer in bgp_establish().
3.  Disable all NSF flags, clear stale routes (if present), stop  restart & stale timers
    (if they are running) when the bgp GR mode is changed to “Disabled”.
4.  Disable R-bit in cap, if it is not set the received open message.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: show BGP GR Neighbor mode as “NotApplicable”,when local mode is “Disable”.
bisdhdh [Thu, 24 Oct 2019 03:34:05 +0000 (09:04 +0530)]
bgpd: show BGP GR Neighbor mode as “NotApplicable”,when local mode is “Disable”.

BGP GR Neighbor mode is showing the default string as “NotRecieved”,
as the bgp gr neighbour capability was not processed,
since the local mode is “Disable”.
However now it would be changed to  “NotApplicable”.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Fix for BGP core when connected routes are redistributed
bisdhdh [Wed, 23 Oct 2019 19:15:43 +0000 (00:45 +0530)]
bgpd: Fix for BGP core when connected routes are redistributed
& GR is enabled.

When GR with deferral is enabled and connected routes are
distributed then in one race condition route node gets added
in to both deferred queue and work queue. If deferred queue
gets processed first then it ends up delete only flag while
leaving the entry in the work queue as it is. When a new update
comes for the same route node next time from peer then it hits
assert. Assert check is added to ensure we don’t add to work queue
again while it is already present.
So, check before adding in to deferred queue if it is already present
in work queue and bail if so.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Adding BGP GR change mode config apply on notification sent & received.
bisdhdh [Wed, 23 Oct 2019 19:12:10 +0000 (00:42 +0530)]
bgpd: Adding BGP GR change mode config apply on notification sent & received.

* Changing GR mode on a router needs a session reset from the
SAME router to negotiate new GR capability.
* The present GR implementation needs a session reset after every
new BGP GR mode change.
* When BGP session reset happens due to sending or receiving BGP
notification after changing BGP GR mode, there is no need of
explicit session reset.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Adding BGP GR Neighbour mode show, when local mode is “Disable”.
bisdhdh [Wed, 23 Oct 2019 19:10:06 +0000 (00:40 +0530)]
bgpd: Adding BGP GR Neighbour mode show, when local mode is “Disable”.

* BGP GR Neighbour mode in show command would show as
“NotApplicable”, when local mode is “Disable”. As the bgp
gr neighbour capability was not processed, since the local mode
is “Disable”.
* Minor changes in show Selection Deferral Time.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Adding Selection Deferral Timer handler changes.
bisdhdh [Wed, 23 Oct 2019 18:14:51 +0000 (23:44 +0530)]
bgpd: Adding Selection Deferral Timer handler changes.

* Selection Deferral Timer for Graceful Restart.
* Added selection deferral timer handling function.
* Route marking as selection defer when update message is received.
* Staggered processing of routes which are pending best selection.
* Fix for multi-path test case.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Adding changes for Selection Deferral Timer config cmd
bisdhdh [Wed, 23 Oct 2019 17:45:57 +0000 (23:15 +0530)]
bgpd: Adding changes for Selection Deferral Timer config cmd
and DS.

* Added config commands and data structures for deferral timer
configuration and processing.
Cmd : bgp graceful-restart select-defer-time (0-3600)
Cmd : no bgp graceful-restart select-defertime (0-3600)

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
Signed-off-by: Soman K S <somanks@vmware.com>
4 years agobgpd: Adding BGP GR Per Neighbor show commands.
bisdhdh [Wed, 23 Oct 2019 10:02:48 +0000 (15:32 +0530)]
bgpd: Adding BGP GR Per Neighbor show commands.

* Added new show command to show the graceful restart
information for each neighbor.
Cmd: show bgp [<ipv4|ipv6>] neighbors [<A.B.C.D|X:X::X:X|WORD>] graceful-restart
* Changes to show neighbors commands for displaying
graceful restart information.
Cmd :show [ip] bgp [<view|vrf> VIEWVRFNAME] [<ipv4|ipv6>] neighbors [<A.B.C.D|X:X::X:X|

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Adding BGP GR Per Neighbor config commands.
bisdhdh [Wed, 23 Oct 2019 08:44:02 +0000 (14:14 +0530)]
bgpd: Adding BGP GR Per Neighbor config commands.

* Added configuration commands for enabling and disabling graceful restart
per neighbour.
Cmd : neighbor A.B.C.D graceful-restart
Cmd : no neighbor A.B.C.D graceful-restart
Cmd : neighbor A.B.C.D graceful-restart-helper
Cmd : no neighbor A.B.C.D graceful-restart-helper
Cmd : neighbor A.B.C.D graceful-restart-disable
Cmd : no neighbor A.B.C.D graceful-restart-disable
* Added configuration commands for disabling graceful restart at the global
Level.
Cmd : bgp graceful-restart disable
Cmd : no  bgp graceful-restart disable

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: BGP GR advertise capabilities in the open message.
bisdhdh [Wed, 23 Oct 2019 08:13:42 +0000 (13:43 +0530)]
bgpd: BGP GR advertise capabilities in the open message.

* Changes to the capability sending function to advertise
graceful restart capability in the bgp OPEN message.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: Adding BGP GR Global & Per Neighbour FSM changes
bisdhdh [Wed, 23 Oct 2019 05:40:22 +0000 (11:10 +0530)]
bgpd: Adding BGP GR Global & Per Neighbour FSM changes

 * Added FSM for peer and global configuration for graceful restart
 * Added debug option BGP_GRACEFUL_RESTART for logs specific to
 graceful restart processing

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agobgpd: BGP Graceful Restart Per Neighbor(BGPN), DS & header files.
bisdhdh [Wed, 23 Oct 2019 05:32:45 +0000 (11:02 +0530)]
bgpd: BGP Graceful Restart Per Neighbor(BGPN), DS & header files.

This pr contains all the header files changes for BGP GR per Neighbour(BGPN)
feature.

Signed-off-by: Biswajit Sadhu <sadhub@vmware.com>
4 years agodoc: Update ospf unnumbered documentation
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>
4 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>
4 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>
4 years agoMerge pull request #5412 from opensourcerouting/bfdd-vrf-fix
Quentin Young [Wed, 22 Jan 2020 19:14:21 +0000 (14:14 -0500)]
Merge pull request #5412 from opensourcerouting/bfdd-vrf-fix

bfdd: fix multiple VRF handling

4 years agozebra: check afi validity in vrf label message
Quentin Young [Fri, 3 Jan 2020 22:49:01 +0000 (17:49 -0500)]
zebra: check afi validity in vrf label message

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agolib: add macro to check if value is valid afi
Quentin Young [Fri, 3 Jan 2020 22:48:36 +0000 (17:48 -0500)]
lib: add macro to check if value is valid afi

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5710 from opensourcerouting/fix_centos6
Mark Stapp [Wed, 22 Jan 2020 13:22:48 +0000 (08:22 -0500)]
Merge pull request #5710 from opensourcerouting/fix_centos6

lib: Fix missing __be16 typedef on CentOS6

4 years agoMerge pull request #5656 from pguibert6WIND/import_evpn_entries
Donatas Abraitis [Wed, 22 Jan 2020 08:21:59 +0000 (10:21 +0200)]
Merge pull request #5656 from pguibert6WIND/import_evpn_entries

bgpd: import evpn entries with nexthop self attribute

4 years agoMerge pull request #5473 from yasuhiro-ohara-ntt/ospf6d-self-orig-maxage-fix
Sri Mohana Singamsetty [Tue, 21 Jan 2020 17:04:04 +0000 (22:34 +0530)]
Merge pull request #5473 from yasuhiro-ohara-ntt/ospf6d-self-orig-maxage-fix

ospf6d: ospf6_flood.c: self-originated MaxAge LSAs to install and refresh.

4 years agotopotest: minor doc, lutil, sharpd not compiled changes (#5675)
David Lamparter [Tue, 21 Jan 2020 16:32:59 +0000 (17:32 +0100)]
topotest: minor doc, lutil, sharpd not compiled changes (#5675)

topotest: minor doc, lutil, sharpd not compiled changes

4 years agobfdd: fix format strings
David Lamparter [Tue, 21 Jan 2020 14:02:41 +0000 (15:02 +0100)]
bfdd: fix format strings

... now that we get warnings about them ...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobfdd: remove logging shim
David Lamparter [Tue, 21 Jan 2020 13:29:17 +0000 (14:29 +0100)]
bfdd: remove logging shim

This does exactly nothing, other than hiding format warnings...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agozebra: include zebra nexthop debug in show runn
Mark Stapp [Fri, 17 Jan 2020 21:07:33 +0000 (16:07 -0500)]
zebra: include zebra nexthop debug in show runn

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

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotopotest: log results summary at end of lutil run
Lou Berger [Tue, 14 Jan 2020 16:24:12 +0000 (11:24 -0500)]
topotest: log results summary at end of lutil run

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agotopotest: bgp_l3vpn_to_bgp_vrf - catch case of sharpd not being compiled
Lou Berger [Tue, 14 Jan 2020 13:19:05 +0000 (08:19 -0500)]
topotest: bgp_l3vpn_to_bgp_vrf - catch case of sharpd not being compiled

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agodoc: recommend compiling with sharpd to enable scaling testing
Lou Berger [Tue, 14 Jan 2020 13:16:48 +0000 (08:16 -0500)]
doc: recommend compiling with sharpd to enable scaling testing

Signed-off-by: Lou Berger <lberger@labn.net>
4 years agolib: Fix missing __be16 typedef on CentOS6
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>
4 years agodoc: add instructions for static linking (#5668)
David Lamparter [Mon, 20 Jan 2020 09:42:29 +0000 (10:42 +0100)]
doc: add instructions for static linking (#5668)

doc: add instructions for static linking

4 years agoMerge pull request #5707 from donaldsharp/nexthop_encoding
Donatas Abraitis [Sat, 18 Jan 2020 21:25:56 +0000 (23:25 +0200)]
Merge pull request #5707 from donaldsharp/nexthop_encoding

Nexthop encoding

4 years agotests: Add another router to the basic pim tests
Donald Sharp [Sat, 18 Jan 2020 14:16:10 +0000 (09:16 -0500)]
tests: Add another router to the basic pim tests

Add an additional router to the basic pim tests.
1) This test will add a link between r1 and a new rp
2) This test will ensure that r1 and rp have the expected
who is the rp.
3) This test will ensure that the rp has received the upstream
data for the multicast stream that is started.

Ostensibly commit
68a02e06e5f103048d947262c08c569056f74d1c is the first bad commit
commit 68a02e06e5f103048d947262c08c569056f74d1c
Author: Mark Stapp <mjs@voltanet.io>
Date:   Wed Nov 13 16:06:06 2019 -0500
    *: revise zapi nexthop encoding
    Use a per-nexthop flag to indicate the presence of labels; add
    some utility zapi encode/decode apis for nexthops; use the zapi
    apis more consistently.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Sparked this commit in that it broke nexthop reporting to upper
level protocols.  Ensure that this expectation stays working
in the future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5703 from ton31337/feature/limit_outgoing_prefixes
Donald Sharp [Sat, 18 Jan 2020 17:20:44 +0000 (12:20 -0500)]
Merge pull request #5703 from ton31337/feature/limit_outgoing_prefixes

bgpd: Add an option to limit outgoing prefixes

4 years agoMerge pull request #5704 from opensourcerouting/build-cleanup-20200117
Donald Sharp [Sat, 18 Jan 2020 17:09:45 +0000 (12:09 -0500)]
Merge pull request #5704 from opensourcerouting/build-cleanup-20200117

build: random cleanups