]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #2684 from netravnen/feature/bgpd/well-known-communities
Russ White [Sat, 4 Aug 2018 13:57:32 +0000 (09:57 -0400)]
Merge pull request #2684 from netravnen/feature/bgpd/well-known-communities

Add missing bgp well-known communities

5 years agoMerge pull request #2731 from chiragshah6/mdev
Lou Berger [Fri, 3 Aug 2018 18:12:21 +0000 (14:12 -0400)]
Merge pull request #2731 from chiragshah6/mdev

bgpd: route detail output local pref display

5 years agoMerge pull request #2782 from pacovn/Coverity_1472236_Improper_use_of_negative_value
Quentin Young [Fri, 3 Aug 2018 17:19:13 +0000 (13:19 -0400)]
Merge pull request #2782 from pacovn/Coverity_1472236_Improper_use_of_negative_value

zebra: socket fd check (Coverity 1472236)

5 years agozebra: socket fd check (Coverity 1472236)
F. Aragon [Fri, 3 Aug 2018 13:37:02 +0000 (15:37 +0200)]
zebra: socket fd check (Coverity 1472236)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2783 from pacovn/Coverity_1472229_variable_scope
Quentin Young [Fri, 3 Aug 2018 16:07:19 +0000 (12:07 -0400)]
Merge pull request #2783 from pacovn/Coverity_1472229_variable_scope

bgpd: variable scope (Coverity 1472229)

5 years agoMerge pull request #2781 from pacovn/Coverity_1472237_null_check
Rafael Zalamena [Fri, 3 Aug 2018 16:01:11 +0000 (13:01 -0300)]
Merge pull request #2781 from pacovn/Coverity_1472237_null_check

bgpd: null check (Coverity 1472237)

5 years agoMerge pull request #2780 from pacovn/Coverity_1472238_dead_code
Rafael Zalamena [Fri, 3 Aug 2018 15:25:59 +0000 (12:25 -0300)]
Merge pull request #2780 from pacovn/Coverity_1472238_dead_code

bgpd: dead code (Coverity 1472230 1472231 1472238)

5 years agoMerge pull request #2784 from pacovn/Coverity_1472227_dead_code
Rafael Zalamena [Fri, 3 Aug 2018 15:18:58 +0000 (12:18 -0300)]
Merge pull request #2784 from pacovn/Coverity_1472227_dead_code

ospfd: dead code (Coverity 1472227)

5 years agobgpd: null check (Coverity 1472237)
F. Aragon [Fri, 3 Aug 2018 13:23:26 +0000 (15:23 +0200)]
bgpd: null check (Coverity 1472237)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: dead code (Coverity 1472230 1472231 1472238)
F. Aragon [Fri, 3 Aug 2018 13:14:58 +0000 (15:14 +0200)]
bgpd: dead code (Coverity 1472230 1472231 1472238)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2779 from pacovn/Coverity_1472226_1472228_1472239
Rafael Zalamena [Fri, 3 Aug 2018 14:15:32 +0000 (11:15 -0300)]
Merge pull request #2779 from pacovn/Coverity_1472226_1472228_1472239

bgpd: rsc leak (Coverity 1472226 1472228 1472239)

5 years agoospfd: dead code (Coverity 1472227)
F. Aragon [Fri, 3 Aug 2018 13:51:05 +0000 (15:51 +0200)]
ospfd: dead code (Coverity 1472227)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: variable scope (Coverity 1472229)
F. Aragon [Fri, 3 Aug 2018 13:47:03 +0000 (15:47 +0200)]
bgpd: variable scope (Coverity 1472229)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: rsc leak (Coverity 1472226 1472228 1472239)
F. Aragon [Fri, 3 Aug 2018 12:55:10 +0000 (14:55 +0200)]
bgpd: rsc leak (Coverity 1472226 1472228 1472239)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2760 from donaldsharp/bgp_patch_from_dev
Russ White [Thu, 2 Aug 2018 12:15:29 +0000 (08:15 -0400)]
Merge pull request #2760 from donaldsharp/bgp_patch_from_dev

bgpd: Fix show ip bgp summary json command for dynamicPeers

5 years agoMerge pull request #2761 from donaldsharp/rip_memory
Russ White [Thu, 2 Aug 2018 12:14:39 +0000 (08:14 -0400)]
Merge pull request #2761 from donaldsharp/rip_memory

ripd: Use memory management for interface commands in RIP

5 years agoMerge pull request #2771 from qlyoung/fix-zserv-shutdown-crash-3
Russ White [Thu, 2 Aug 2018 12:07:43 +0000 (08:07 -0400)]
Merge pull request #2771 from qlyoung/fix-zserv-shutdown-crash-3

zebra: don't close client socket from I/O pthread mc crasherson mc crashy crash bandicoot

5 years agoMerge pull request #2767 from donaldsharp/bgp_timers
Russ White [Thu, 2 Aug 2018 00:14:35 +0000 (20:14 -0400)]
Merge pull request #2767 from donaldsharp/bgp_timers

bgpd: Intentionally stop some timers on instance removal

5 years agolib: Ensure read/write fd's are in range
Donald Sharp [Wed, 1 Aug 2018 19:07:07 +0000 (15:07 -0400)]
lib: Ensure read/write fd's are in range

Ensure that we can properly handle a passed in read/write
fd for using in poll.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: don't close client socket from I/O pthread
Quentin Young [Wed, 1 Aug 2018 19:27:13 +0000 (19:27 +0000)]
zebra: don't close client socket from I/O pthread

The client socket value can only be modified by the main thread.
Modifying the client socket from within the client I/O pthread
introduces race conditions.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agozebra: ensure cleanup of rib on client close
Quentin Young [Wed, 1 Aug 2018 19:38:41 +0000 (19:38 +0000)]
zebra: ensure cleanup of rib on client close

Socket should be closed in zserv_client_free() and nowhere else.

Credit to Mark Stapp for catching this one.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #2769 from ajones-rvbd/ajones-frr-reload
Donald Sharp [Wed, 1 Aug 2018 18:09:24 +0000 (14:09 -0400)]
Merge pull request #2769 from ajones-rvbd/ajones-frr-reload

tools/frr: make frr reload error message clearer on missing frr-reload.py

5 years agotools/frr: make frr reload error message clearer on missing frr-reload.py
Arthur Jones [Wed, 1 Aug 2018 16:22:52 +0000 (09:22 -0700)]
tools/frr: make frr reload error message clearer on missing frr-reload.py

Only frr-reload.py pulls in a python depenedency for frr, we can
reduce the size of the base frr package by a lot if we separate
out frr-pythontools.  When we do this, we get a somewhat cryptic
error message when frr-reload.py is missing on frr reload.

Here, we pull the error message from frr-reload script, which is
much clearer.

Testing done:

frr reload both with and without the frr-reload.py script, see
the frr-reload message when missing and it runs frr-reload.py when
not missing.

Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
5 years agoMerge pull request #2766 from lyq140/branch1
Donald Sharp [Wed, 1 Aug 2018 14:42:52 +0000 (10:42 -0400)]
Merge pull request #2766 from lyq140/branch1

ripd: null check key

5 years agoMerge pull request #2765 from opensourcerouting/fix-getsockoptdata
Donald Sharp [Wed, 1 Aug 2018 14:17:30 +0000 (10:17 -0400)]
Merge pull request #2765 from opensourcerouting/fix-getsockoptdata

lib: fix getsockopt_cmsg_data retrieval

5 years agobgpd: Intentionally stop some timers on instance removal
Donald Sharp [Wed, 1 Aug 2018 13:29:43 +0000 (09:29 -0400)]
bgpd: Intentionally stop some timers on instance removal

When a bgp instance is stopped, with a `no router bgp..`
make sure any timers associated with the instance are stopped
as well.

This issue was discovered when a customer issued a `no router bgp`
while a maxmed timer was operative.  The max-med timer used the
`struct bgp *` as the passed in value for the thread.  The
thread eventually popped after the cleanup and attempted to use
data off in lala land and crashed

Ticket: CM-21895
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoripd: null check key
lyq140 [Wed, 1 Aug 2018 12:48:36 +0000 (20:48 +0800)]
ripd: null check key

Fix ripd crash of null pointer.
when authenticate a rip packet,
the key pointer or the key string pointer may be null,
the code have to return then.

Signed-off-by: lyq140 <34637052+lyq140@users.noreply.github.com>
5 years agolib: fix getsockopt_cmsg_data retrieval
Rafael Zalamena [Wed, 30 May 2018 20:04:57 +0000 (17:04 -0300)]
lib: fix getsockopt_cmsg_data retrieval

The `type` parameter was not being compared with `cmsg_type`, so the
result of this function was always a pointer to the first header
matching the level.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #2763 from lyq140/master
Donald Sharp [Wed, 1 Aug 2018 11:56:50 +0000 (07:56 -0400)]
Merge pull request #2763 from lyq140/master

ripd: null check the key string

5 years agoripd: null check the key string
lyq140 [Wed, 1 Aug 2018 04:03:24 +0000 (12:03 +0800)]
ripd: null check the key string

This fix a crash of  null pointer.
when we don't add a key string or delete it,
the key is not null but key string is null,
so the code have to return.

Signed-off-by: lyq140 <34637052+lyq140@users.noreply.github.com>
5 years agoMerge pull request #2759 from donaldsharp/pim_duplicate
Russ White [Wed, 1 Aug 2018 01:11:28 +0000 (21:11 -0400)]
Merge pull request #2759 from donaldsharp/pim_duplicate

Pim duplicate

5 years agoMerge pull request #2755 from ton31337/feature/default-originate_apply_route-maps
Russ White [Wed, 1 Aug 2018 01:09:06 +0000 (21:09 -0400)]
Merge pull request #2755 from ton31337/feature/default-originate_apply_route-maps

bgpd: Make sure default-originate works without route-map as well

5 years agoMerge pull request #2752 from qlyoung/doc-fix-rpki-index-error
Russ White [Wed, 1 Aug 2018 01:06:33 +0000 (21:06 -0400)]
Merge pull request #2752 from qlyoung/doc-fix-rpki-index-error

Fix various rpki.rst errors (again)

5 years agoripd: Use memory management for interface commands in RIP
Donald Sharp [Tue, 31 Jul 2018 23:31:09 +0000 (19:31 -0400)]
ripd: Use memory management for interface commands in RIP

During code inspection it was noticed that rip is not fully
using FRR memory code as it should.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Fix show ip bgp summary json command for dynamicPeers
Dongling Duan [Tue, 31 Jul 2018 23:00:31 +0000 (19:00 -0400)]
bgpd: Fix show ip bgp summary json command for dynamicPeers

The dn_count for dynamic Peers was not being updated when
using json output.

Signed-off-by: Dongling Duan <dlduan@amazon.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Abstract a RPF change for upstream handling
Donald Sharp [Tue, 31 Jul 2018 22:27:54 +0000 (18:27 -0400)]
pimd: Abstract a RPF change for upstream handling

Abstract the RPF change for upstream handling code so
that we do not have two copies of the code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Abstract sending of data to peers
Donald Sharp [Tue, 31 Jul 2018 21:40:37 +0000 (17:40 -0400)]
pimd: Abstract sending of data to peers

After we have decided what has changed as part of a update
we need to send the j/p messages to our peers.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2753 from qlyoung/fix-zebra-shutdown-crash-2
Jafar Al-Gharaibeh [Tue, 31 Jul 2018 15:31:55 +0000 (10:31 -0500)]
Merge pull request #2753 from qlyoung/fix-zebra-shutdown-crash-2

Fix zebra shutdown crash: Round 3

5 years agobgpd: Make sure default-originate works without route-map as well
Donatas Abraitis [Tue, 31 Jul 2018 07:15:51 +0000 (10:15 +0300)]
bgpd: Make sure default-originate works without route-map as well

5 years agozebra: dont delete pthreads from under themselves
Quentin Young [Thu, 26 Jul 2018 00:27:40 +0000 (00:27 +0000)]
zebra: dont delete pthreads from under themselves

* Rename some things to be less confusing
* Convert client close function to take a client struct rather than a
  task
* Extern client close function and use it when handling SIGTERM

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: remove unknown option role from rpki.rst
Quentin Young [Mon, 30 Jul 2018 18:58:38 +0000 (18:58 +0000)]
doc: remove unknown option role from rpki.rst

Options must be documented before they can be cross-referenced, and the
scope for configure options is not present in rpki.rst. Remove the
option role tag from the `-M` option to remove the build warning.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: unindent index block content in rpki.rst
Quentin Young [Mon, 30 Jul 2018 18:55:48 +0000 (18:55 +0000)]
doc: unindent index block content in rpki.rst

Index directives cannot contain content.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoUpdate bgp_clist.c
Christoffer Hansen [Sun, 29 Jul 2018 14:57:12 +0000 (16:57 +0200)]
Update bgp_clist.c

5 years agobgpd: Add missing bgp well-known communities
Christoffer [Thu, 19 Jul 2018 11:29:11 +0000 (13:29 +0200)]
bgpd: Add missing bgp well-known communities

Updated the list with listed well-known communities from document IANA's https://www.iana.org/assignments/bgp-well-known-communities/bgp-well-known-communities.txt with last update date as of 2018-03-07.

- GRACEFUL_SHUTDOWN moved to 2nd entry in all lists in touched code.
- Added ACCEPT_OWN - [RFC7611]
- Added ROUTE_FILTER_TRANSLATED_v4 - currently [draft-l3vpn-legacy-rtc]
- Added ROUTE_FILTER_v4 - currently [draft-l3vpn-legacy-rtc]
- Added ROUTE_FILTER_TRANSLATED_v6 - currently [draft-l3vpn-legacy-rtc]
- Added ROUTE_FILTER_v6 - currently [draft-l3vpn-legacy-rtc]
- Added LLGR_STALE - currently [draft-uttaro-idr-bgp-persistence]
- Added NO_LLGR - currently [draft-uttaro-idr-bgp-persistence]
- Added accept-own-nexthop - currently [draft-agrewal-idr-accept-own-nexthop]
- Added BLACKHOLE - [RFC7999]
- Added NOPEER - [RFC3765]

5 years agoMerge pull request #2696 from sworleys/Netlink-Fuzz
Russ White [Sun, 29 Jul 2018 12:33:43 +0000 (08:33 -0400)]
Merge pull request #2696 from sworleys/Netlink-Fuzz

zebra: Add code for fuzzing netlink

5 years agoMerge pull request #2700 from sworleys/Netlink-Prefix-Len-Check
Russ White [Sun, 29 Jul 2018 12:32:14 +0000 (08:32 -0400)]
Merge pull request #2700 from sworleys/Netlink-Prefix-Len-Check

zebra: Add check for prefix length from kernel messages

5 years agoMerge pull request #2728 from donaldsharp/table_cleanup
Russ White [Sun, 29 Jul 2018 12:24:38 +0000 (08:24 -0400)]
Merge pull request #2728 from donaldsharp/table_cleanup

lib: Add parameter names as a hint of what is expected.

5 years agoMerge pull request #2735 from sworleys/Netlink-Next-Fault
Russ White [Sun, 29 Jul 2018 11:58:01 +0000 (07:58 -0400)]
Merge pull request #2735 from sworleys/Netlink-Next-Fault

zebra: Check for netlink message next fault

5 years agoMerge pull request #2748 from chiragshah6/evpn_dev
Russ White [Sun, 29 Jul 2018 11:53:31 +0000 (07:53 -0400)]
Merge pull request #2748 from chiragshah6/evpn_dev

zebra: display consistant mac count

5 years agozebra: display consistant mac count
Chirag Shah [Sat, 28 Jul 2018 18:23:10 +0000 (11:23 -0700)]
zebra: display consistant mac count

show evpn mac vni all
show evpn mac vni x
does not display local svi and anycast mac into count.

Ticket:CM-20456
Testing Done:

Before:

TOR1# show evpn mac vni 1008
Number of MACs (local and remote) known for this VNI: 4
MAC               Type   Intf/Remote VTEP      VLAN
44:38:39:00:6b:4c local  vlan1008              1008
00:02:00:00:00:04 local  hostbond5             1008
00:02:00:00:00:02 local  hostbond4             1008
00:00:5e:00:01:01 local  vlan1008-v0           1008
00:02:00:00:00:0c remote 27.0.0.15
00:02:00:00:00:0a remote 27.0.0.15
dell-s6000-07#

After:

TOR1# show evpn mac vni 1008
Number of MACs (local and remote) known for this VNI: 6
MAC               Type   Intf/Remote VTEP      VLAN
44:38:39:00:6b:4c local  vlan1008              1008
00:02:00:00:00:04 local  hostbond5             1008
00:02:00:00:00:02 local  hostbond4             1008
00:00:5e:00:01:01 local  vlan1008-v0           1008
00:02:00:00:00:0c remote 27.0.0.15
00:02:00:00:00:0a remote 27.0.0.15

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoMerge pull request #2719 from pguibert6WIND/fix_tableno_vrf
Lou Berger [Sat, 28 Jul 2018 14:42:07 +0000 (10:42 -0400)]
Merge pull request #2719 from pguibert6WIND/fix_tableno_vrf

zebra: fix missing table identifier passed for ip route vrf commands

5 years agoMerge pull request #2742 from vangheem/master
Lou Berger [Sat, 28 Jul 2018 14:29:10 +0000 (10:29 -0400)]
Merge pull request #2742 from vangheem/master

fix json output when vrf not active

5 years agoMerge pull request #2746 from chiragshah6/mdev1
Lou Berger [Sat, 28 Jul 2018 14:18:12 +0000 (10:18 -0400)]
Merge pull request #2746 from chiragshah6/mdev1

bgpd: add keepalive thread name

5 years agoMerge pull request #2745 from adharkar/frr-filtered_route
Lou Berger [Sat, 28 Jul 2018 14:16:20 +0000 (10:16 -0400)]
Merge pull request #2745 from adharkar/frr-filtered_route

bgpd: Show routes filtered by prefix-list in filter-routes command

5 years agobgpd: add keepalive thread name
Chirag Shah [Thu, 26 Jul 2018 21:20:54 +0000 (14:20 -0700)]
bgpd: add keepalive thread name

Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobgpd: route detail output local pref display
Chirag Shah [Thu, 26 Jul 2018 04:57:54 +0000 (21:57 -0700)]
bgpd: route detail output local pref display

Avoid displaying default configured local preference as
part of bgp route's detail output.
Local preference is for iBGP learnt route's. The value could be
default (100) or configured value (via routemap or local pref config cmd).
show bgp afi safi (brief output) does not display,
if the local pref attribute is not set.
Similarly, show bgp afi safi detail route output should display
if the the attribute is set, and should not display configured value.
This way both output would be consistent.
The configured local preference can be seen via running-config.

Ticket:CM-12769
Reviewed By:
Testing Done:

eBGP output:
show bgp ipv4 45.0.3.0/24
BGP routing table entry for 45.0.3.0/24
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  MSP1(uplink-1) MSP2(uplink-2)
  Local
    0.0.0.0 from 0.0.0.0 (27.0.0.9)
      Origin incomplete, metric 0, weight 32768, valid,sourced, bestpath-from-AS Local, best
      AddPath ID: RX 0, TX 7
      Last update: Thu Jul 26 02:10:02 2018

iBGP output:

show bgp ipv4 unicast 6.0.0.16/32
BGP routing table entry for 6.0.0.16/32
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  Local
    6.0.0.16 (metric 20) from tor-12(6.0.0.16) (6.0.0.16)
      Origin incomplete, metric 0, localpref 100, valid, internal, bestpath-from-AS Local, best
      AddPath ID: RX 0, TX 13
      Last update: Thu Jul 26 05:26:18 2018

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobgpd: Show routes filtered by prefix-list in filter-routes command
Ameya Dharkar [Fri, 27 Jul 2018 18:23:32 +0000 (11:23 -0700)]
bgpd: Show routes filtered by prefix-list in filter-routes command
Update:Addressed review comments

Changed "show bgp ipv4 neighbor filtered-routes"
to show routes filtered by prefx lists, distribute lists and filter lists

Closes: #2653
Signed-off-by: Ameya Dharkar adharkar@vmware.com
5 years agoMerge pull request #2743 from donaldsharp/bgp_null_stuff
Lou Berger [Fri, 27 Jul 2018 16:45:08 +0000 (12:45 -0400)]
Merge pull request #2743 from donaldsharp/bgp_null_stuff

Put back some removed Code

5 years agolib,zebra: fix json output when vrf1 when not active
Nathan Van Gheem [Fri, 27 Jul 2018 14:09:38 +0000 (10:09 -0400)]
lib,zebra: fix json output when vrf1 when not active

When I did a show ip route with `json` on a vrf when it didn't exist,
frr would output invalid json.

Signed-off-by: Nathan Van Gheem <nathan@cumulusnetworks.com>
5 years agobgpd: Notice when we unlock if we should NULL pointer
Donald Sharp [Fri, 27 Jul 2018 14:02:34 +0000 (10:02 -0400)]
bgpd: Notice when we unlock if we should NULL pointer

The bi->net pointer that is being unlocked had a commit
that removed the `bi->net = NULL;` recently.  This code
was preventing a use after free crash being experienced
in other code paths.  While commit 37e679629f9 was fixing
a different code path crash.

Make the parent->net pointer aware it may be locked/freed
from multiple places and to not NULL the pointer to it
unless we have actually freed the data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Modify route unlock code to return appropriate pointer
Donald Sharp [Fri, 27 Jul 2018 13:54:39 +0000 (09:54 -0400)]
lib: Modify route unlock code to return appropriate pointer

Modify the unlock code for a route_node to return NULL on
pointer freed or to return the node itself again.

We'll need to go through the code and fix this pattern,
but this is a problem for another day.  Get this fix in
place and we can make it a low hanging problem to fix.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2708 from ton31337/feature/default-originate_apply_route-maps
Russ White [Fri, 27 Jul 2018 13:05:43 +0000 (09:05 -0400)]
Merge pull request #2708 from ton31337/feature/default-originate_apply_route-maps

bgpd: Set attributes according route-maps if applied for default-originate

5 years agoMerge pull request #2737 from vishaldhingra/master
Russ White [Fri, 27 Jul 2018 13:05:00 +0000 (09:05 -0400)]
Merge pull request #2737 from vishaldhingra/master

bgpd: changes for crash seen in BGP on "no rt vpn" bug Id 2667

5 years agozebra: fix missing table identifier passed for ip route vrf commands
Philippe Guibert [Wed, 25 Jul 2018 09:32:13 +0000 (11:32 +0200)]
zebra: fix missing table identifier passed for ip route vrf commands

The parameter was missing in that vty command. Then it is being added.
Also some documentation is refreshed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #1 from vishaldhingra/bug_fix
vishaldhingra [Fri, 27 Jul 2018 04:37:33 +0000 (10:07 +0530)]
Merge pull request #1 from vishaldhingra/bug_fix

bgpd: changes for crash seen in BGP on "no rt vpn" bug Id 2667

5 years agobgpd: Set attributes according route-maps if applied for default-originate
Donatas Abraitis [Tue, 24 Jul 2018 13:42:53 +0000 (16:42 +0300)]
bgpd: Set attributes according route-maps if applied for default-originate

5 years agoMerge pull request #2729 from qlyoung/doc-misc-bgp-fixes
Russ White [Fri, 27 Jul 2018 02:32:40 +0000 (22:32 -0400)]
Merge pull request #2729 from qlyoung/doc-misc-bgp-fixes

doc: misc bgp.rst fixes

5 years agobgpd: Show routes filtered by prefix-list in filter-routes command
Ameya Dharkar [Thu, 26 Jul 2018 21:48:05 +0000 (14:48 -0700)]
bgpd: Show routes filtered by prefix-list in filter-routes command

Changed "show bgp ipv4 neighbor <peer> filtered-routes"
to show routes filtered by prefx lists, distribute lists and filter lists

Closes: #2653
Signed-off-by: Ameya Dharkar adharkar@vmware.com
5 years agozebra: Check for netlink message next fault
Stephen Worley [Thu, 26 Jul 2018 20:12:05 +0000 (16:12 -0400)]
zebra: Check for netlink message next fault

NLMSG_NEXT decrements the buffer length (status) by
the header msg length (nlmsg_len) everytime its called.
If nlmsg_len isn't accurate and set to be larger than
what it should represent, it will cause status to
decrement passed 0. This makes NLMSG_NEXT return a
pointer that references an inaccessible address.
When that is passed to NLMSG_OK, it segfaults.

Add a check to verify that there is still something to read
before we try to.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge branch 'master' into Netlink-Prefix-Len-Check
Stephen Worley [Thu, 26 Jul 2018 19:34:56 +0000 (15:34 -0400)]
Merge branch 'master' into Netlink-Prefix-Len-Check

5 years agozebra: Make prefix length check return error
Stephen Worley [Thu, 26 Jul 2018 19:10:53 +0000 (15:10 -0400)]
zebra: Make prefix length check return error

Prefix length validation checks should be returning an error
rather than 0. Switch to that and make them error messages.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoStyle, don't initialize netlink_read flag
Stephen Worley [Thu, 26 Jul 2018 18:34:28 +0000 (14:34 -0400)]
Style, don't initialize netlink_read flag

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agozebra: Make fuzzer code use default netlink socket
Stephen Worley [Thu, 26 Jul 2018 18:30:04 +0000 (14:30 -0400)]
zebra: Make fuzzer code use default netlink socket

Change the fuzzing code so that it fakes data from
the listening socket rather than using its own pseudo one.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #2727 from donaldsharp/pim_jp_lollipops
Jafar Al-Gharaibeh [Thu, 26 Jul 2018 15:18:39 +0000 (10:18 -0500)]
Merge pull request #2727 from donaldsharp/pim_jp_lollipops

pimd: RPT Prunes do not need to be figured for a *,G Prune

5 years agoMerge pull request #2607 from pguibert6WIND/complement_fs_patch3
Donald Sharp [Thu, 26 Jul 2018 13:25:35 +0000 (09:25 -0400)]
Merge pull request #2607 from pguibert6WIND/complement_fs_patch3

Complement fs patch3

5 years agolib: add cancel point to default pthread loop
Quentin Young [Thu, 26 Jul 2018 00:27:27 +0000 (00:27 +0000)]
lib: add cancel point to default pthread loop

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #2681 from qlyoung/doc-cleanup-rpki
Jafar Al-Gharaibeh [Wed, 25 Jul 2018 22:04:02 +0000 (17:04 -0500)]
Merge pull request #2681 from qlyoung/doc-cleanup-rpki

doc: cleanup rpki.rst

5 years agoMerge pull request #2662 from donaldsharp/tests
Lou Berger [Wed, 25 Jul 2018 21:53:05 +0000 (17:53 -0400)]
Merge pull request #2662 from donaldsharp/tests

Tests

5 years agodoc: misc bgp.rst fixes
Quentin Young [Tue, 24 Jul 2018 17:21:19 +0000 (17:21 +0000)]
doc: misc bgp.rst fixes

* Clean up command stubs
* Document `disable-connected-check`
* Add markup
* Clarify section on autonomous systems
* Rewrap line to 80 characters
* Fix typos
* Fix grammar

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: Add parameter names as a hint of what is expected.
Donald Sharp [Wed, 25 Jul 2018 19:16:02 +0000 (15:16 -0400)]
lib: Add parameter names as a hint of what is expected.

Add some parameter names to functions in table.h to give a
clue as to what we expect people to pass in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotests: Let compiler know this was an intentionall fallthrough
Donald Sharp [Wed, 25 Jul 2018 19:00:52 +0000 (15:00 -0400)]
tests: Let compiler know this was an intentionall fallthrough

Let the compiler know that this code intentionally fell
through to the next case statement in a switch.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotests: Prevent weird type promotion objection in bgp tests
Donald Sharp [Fri, 13 Jul 2018 11:26:32 +0000 (07:26 -0400)]
tests: Prevent weird type promotion objection in bgp tests

The va_start function cannot take a object that can be type promoted
Looks like a new warning coming in from a new compiler.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotests: Fix const change
Donald Sharp [Fri, 13 Jul 2018 10:14:53 +0000 (06:14 -0400)]
tests: Fix const change

Some of the parameters for lib/srcdest.. have changed to
consts, make the test cases respect that.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: RPT Prunes do not need to be figured for a *,G Prune
Donald Sharp [Wed, 25 Jul 2018 18:37:30 +0000 (14:37 -0400)]
pimd: RPT Prunes do not need to be figured for a *,G Prune

Packet sending in PIM is a two step process.
1) Gather data size of next G to be packed into a packet.
2) Write data

After 1 we need to ensure that the next G to pack will actually
fit in a packet.  If it does not send what we've currently written
and start a new packet to send.

Because this was a 2 step process it is important to be consistent
in what you think you have packed -vs- what you think you should.

PIM has a bug where we were considering S,G RPT Prunes for a *,G
even when the *,G was being pruned.  This lead to a situation where
we were figuring a write size of more data then what we actually wrote
into a packet.  This would leave a 8 byte whole of 0's in the packet
due to the way we moved pointers around.

Fix the code so that we do not attempt to consider S,G rpt prunes
for a *,G prune when figuring out how much we should write in step 1.

Ticket: CM-21644
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2711 from pacovn/isis_test_fixes
Quentin Young [Wed, 25 Jul 2018 18:01:06 +0000 (11:01 -0700)]
Merge pull request #2711 from pacovn/isis_test_fixes

tests/isisd: fix warnings

5 years agoMerge pull request #2712 from pacovn/Security_Uninitialized_memory_access
Renato Westphal [Wed, 25 Jul 2018 14:07:57 +0000 (11:07 -0300)]
Merge pull request #2712 from pacovn/Security_Uninitialized_memory_access

pimd: uninitialized memory access fix

5 years agobgpd: changes for crash seen in BGP on "no rt vpn" bug Id 2667
root [Wed, 25 Jul 2018 12:27:05 +0000 (05:27 -0700)]
bgpd: changes for crash seen in BGP on "no rt vpn" bug Id 2667

There is a default BGP VPN and BGP VRF instance in L3VPN configuration.
The routes are imported and exported between BGP VPN and BGP VRF.
Suppose there is one route in BGP VRF and exported to BGP VPN.
In BGP VPN there is bgp_info struct with bgp_info_extra struct has parent pointer pointing to the bgp_info of BGP VRF.
We take the lock for bgp_node and bgp_info of BGP VRF in the context of BGP VPN.
bgp_info has a back pointer to bgp_node via net.

Now when we have done "no rd vpn" in BGP VRF then in bgp_info_extra_free we have to free the parent resources.
In this context only unlocking is required. It should not set the BGP VRF (bgp_info->net) to NULL.

Signed-off-by: vishaldhingra vdhingra@vmware.com
5 years agoMerge pull request #2704 from sworleys/Netlink-Nexthop-Hang
Russ White [Tue, 24 Jul 2018 23:42:11 +0000 (19:42 -0400)]
Merge pull request #2704 from sworleys/Netlink-Nexthop-Hang

zebra: Add check for nexthop loop to prevent hanging

5 years agoMerge pull request #2706 from chiragshah6/mdev
Russ White [Tue, 24 Jul 2018 23:29:05 +0000 (19:29 -0400)]
Merge pull request #2706 from chiragshah6/mdev

bgpd: Add evpn prefix to debug bgp updates prefix

5 years agoMerge pull request #2714 from qlyoung/fix-unused-variable-zserv
Russ White [Tue, 24 Jul 2018 23:26:13 +0000 (19:26 -0400)]
Merge pull request #2714 from qlyoung/fix-unused-variable-zserv

zebra: remove unused var in zserv.c

5 years agopimd: uninitialized memory access fix
F. Aragon [Tue, 24 Jul 2018 16:46:38 +0000 (18:46 +0200)]
pimd: uninitialized memory access fix

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agodoc: move rpki reference to correct spot
Quentin Young [Tue, 24 Jul 2018 21:13:28 +0000 (21:13 +0000)]
doc: move rpki reference to correct spot

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agozebra: remove unused var in zserv.c
Quentin Young [Tue, 24 Jul 2018 21:01:29 +0000 (21:01 +0000)]
zebra: remove unused var in zserv.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #2699 from sworleys/Netlink-MTU-Check
Renato Westphal [Tue, 24 Jul 2018 20:04:47 +0000 (17:04 -0300)]
Merge pull request #2699 from sworleys/Netlink-MTU-Check

zebra: Add check for mtu on netlink RTM_NEWLINK

5 years agoRefactor code for new fuzzing netlink flag
Stephen Worley [Tue, 24 Jul 2018 17:39:25 +0000 (13:39 -0400)]
Refactor code for new fuzzing netlink flag

Changed the configure flag used by netlink fuzzing
and refactored code accordingly.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agotests/isisd: fix warnings
F. Aragon [Tue, 24 Jul 2018 16:21:57 +0000 (18:21 +0200)]
tests/isisd: fix warnings

Commit ae9c9aba changed isis_vertex_id_init() and isis_find_vertex()
parameters, so compiler reported warnings in the test (the actual data
passing through is the same because of the union used in the latest changes).
This commit fixes the warnings in the test.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2665 from chiragshah6/evpn_dev
Russ White [Tue, 24 Jul 2018 15:55:08 +0000 (11:55 -0400)]
Merge pull request #2665 from chiragshah6/evpn_dev

bgpd: support evpn nd ext community

5 years agoMerge pull request #2707 from opensourcerouting/fix-srcdest-netlink-read
Donald Sharp [Tue, 24 Jul 2018 15:49:49 +0000 (11:49 -0400)]
Merge pull request #2707 from opensourcerouting/fix-srcdest-netlink-read

zebra: do not ignore ipv6 srcdest routes

5 years agoMerge pull request #2640 from pguibert6WIND/doc_ldp
Quentin Young [Tue, 24 Jul 2018 15:34:22 +0000 (11:34 -0400)]
Merge pull request #2640 from pguibert6WIND/doc_ldp

doc: add Ldp user documentation

5 years agoRemove whitespace change in netlink fuzz code
Stephen Worley [Tue, 24 Jul 2018 15:24:42 +0000 (11:24 -0400)]
Remove whitespace change in netlink fuzz code

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>