]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #2790 from lyq140/branch1
David Lamparter [Wed, 8 Aug 2018 18:35:04 +0000 (20:35 +0200)]
Merge pull request #2790 from lyq140/branch1

don't send packets when auth_str is empty (via keychain.)

5 years agoMerge pull request #2794 from netravnen/feature/docs/set-origin
David Lamparter [Wed, 8 Aug 2018 18:28:36 +0000 (20:28 +0200)]
Merge pull request #2794 from netravnen/feature/docs/set-origin

doc: set origin

5 years agoMerge pull request #2799 from adharkar/frr-zebra_cli
David Lamparter [Wed, 8 Aug 2018 18:27:49 +0000 (20:27 +0200)]
Merge pull request #2799 from adharkar/frr-zebra_cli

Zebra: Changes to "show ip route" json commands

5 years agoMerge pull request #2122 from donaldsharp/zebra_nhs
Martin Winter [Wed, 8 Aug 2018 15:07:24 +0000 (08:07 -0700)]
Merge pull request #2122 from donaldsharp/zebra_nhs

Create Staticd

5 years agostaticd: fix tiny whitespace issue
David Lamparter [Wed, 8 Aug 2018 14:00:04 +0000 (16:00 +0200)]
staticd: fix tiny whitespace issue

Just add a linebreak.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #2800 from adharkar/frr-bgp_cli
Russ White [Wed, 8 Aug 2018 10:37:51 +0000 (06:37 -0400)]
Merge pull request #2800 from adharkar/frr-bgp_cli

bgpd: Added local router-id to "show bgp neighbor"

5 years agoMerge pull request #2803 from opensourcerouting/pimd-nbr-uninit-warning
Russ White [Wed, 8 Aug 2018 10:35:15 +0000 (06:35 -0400)]
Merge pull request #2803 from opensourcerouting/pimd-nbr-uninit-warning

pimd: fix bogus uninitialized warning

5 years agoMerge pull request #2764 from opensourcerouting/isis-srcdest
Russ White [Wed, 8 Aug 2018 10:34:46 +0000 (06:34 -0400)]
Merge pull request #2764 from opensourcerouting/isis-srcdest

IS-IS dst-src routing support

5 years agopimd: fix bogus uninitialized warning
David Lamparter [Wed, 8 Aug 2018 10:32:21 +0000 (12:32 +0200)]
pimd: fix bogus uninitialized warning

pimd/pim_nht.c: In function ‘pim_ecmp_nexthop_search’:
pimd/pim_nht.c:523:17: error: ‘nbr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
    nexthop->nbr = nbr;

(on gcc 5.4.0; this is the only warning with that version.)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd: Added local router-id to "show bgp neighbor"
Ameya Dharkar [Tue, 7 Aug 2018 22:25:47 +0000 (15:25 -0700)]
bgpd: Added local router-id to "show bgp neighbor"

Signed-off-by: Ameya Dharkar adharkar@vmware.com
5 years ago1. Added json output to "show ip route <prefix>" command
Ameya Dharkar [Tue, 7 Aug 2018 22:15:34 +0000 (15:15 -0700)]
1. Added json output to "show ip route <prefix>" command
2. Added tag O/P to "show ip route json" command

Signed-off-by: Ameya Dharkar adharkar@vmware.com
5 years agodoc/user/routemap.rst
Christoffer [Mon, 6 Aug 2018 17:31:37 +0000 (19:31 +0200)]
doc/user/routemap.rst

5 years agoMerge pull request #2774 from qlyoung/fix-bgpd-questionable-clist-memory-mgmt
Russ White [Tue, 7 Aug 2018 20:12:41 +0000 (16:12 -0400)]
Merge pull request #2774 from qlyoung/fix-bgpd-questionable-clist-memory-mgmt

bgpd: fix odd memory mgmt in clist strings fn

5 years agoMerge pull request #2788 from ton31337/fix/print_ipv6_route_if_afi
Russ White [Tue, 7 Aug 2018 19:58:26 +0000 (15:58 -0400)]
Merge pull request #2788 from ton31337/fix/print_ipv6_route_if_afi

bgpd: Display `::` if AFI is IPv6, `0.0.0.0` otherwise

5 years agobgpd: fix odd memory mgmt in clist strings fn
Quentin Young [Thu, 2 Aug 2018 17:27:41 +0000 (17:27 +0000)]
bgpd: fix odd memory mgmt in clist strings fn

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #2772 from qlyoung/fix-bgp-updates-prefix-debugging
Rafael Zalamena [Tue, 7 Aug 2018 18:00:21 +0000 (15:00 -0300)]
Merge pull request #2772 from qlyoung/fix-bgp-updates-prefix-debugging

Fix bgp updates prefix debugging

5 years agobgpd: clean up evpn prefix debugging commands
Quentin Young [Tue, 31 Jul 2018 21:35:54 +0000 (21:35 +0000)]
bgpd: clean up evpn prefix debugging commands

* Fix memory leaks in debug commands
* Use CLI tokens to properly sanitize input
* Remove unnecessary error handling code from debug commands
* Remove unnecessary parameters from conf print functions

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd: fix UPDATE debugging for prefixes
Quentin Young [Tue, 31 Jul 2018 20:44:45 +0000 (20:44 +0000)]
bgpd: fix UPDATE debugging for prefixes

Recent patch to support EVPN prefix debugging broke debugging regular
prefixes.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #2795 from qlyoung/fix-control-build-deps
David Lamparter [Tue, 7 Aug 2018 15:55:48 +0000 (17:55 +0200)]
Merge pull request #2795 from qlyoung/fix-control-build-deps

Fix control build deps

5 years agobgpd: Display `::` if AFI is IPv6, `0.0.0.0` otherwise
Donatas Abraitis [Tue, 7 Aug 2018 12:37:57 +0000 (15:37 +0300)]
bgpd: Display `::` if AFI is IPv6, `0.0.0.0` otherwise

Signed-off-by: Donatas Abraitis donatas.abraitis@gmail.com
5 years agoMerge pull request #2726 from sworleys/Netlink-Filter-AFI
Renato Westphal [Mon, 6 Aug 2018 23:26:46 +0000 (20:26 -0300)]
Merge pull request #2726 from sworleys/Netlink-Filter-AFI

zebra: Ignore AF_ETHERNET and AF_MPLS in route change as well

5 years agodebian: remove trailing whitespace from control
Quentin Young [Mon, 6 Aug 2018 20:23:03 +0000 (20:23 +0000)]
debian: remove trailing whitespace from control

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodebian: add install-info to build deps
Quentin Young [Mon, 6 Aug 2018 20:22:48 +0000 (20:22 +0000)]
debian: add install-info to build deps

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #2777 from qlyoung/fix-checkpatch-sh-greps
Lou Berger [Mon, 6 Aug 2018 19:59:35 +0000 (15:59 -0400)]
Merge pull request #2777 from qlyoung/fix-checkpatch-sh-greps

tools: improve checkpatch slicing

5 years agoMerge pull request #2793 from pacovn/Coverity_1472232_1472234_Unchecked_return_value
Quentin Young [Mon, 6 Aug 2018 19:42:49 +0000 (15:42 -0400)]
Merge pull request #2793 from pacovn/Coverity_1472232_1472234_Unchecked_return_value

bgpd pimd: return check (Coverity 1472232 1472234)

5 years agobgpd pimd: return check (Coverity 1472232 1472234)
F. Aragon [Mon, 6 Aug 2018 16:17:39 +0000 (18:17 +0200)]
bgpd pimd: return check (Coverity 1472232 1472234)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoripd: fix packet sending in authenticate mode
lyq140 [Mon, 6 Aug 2018 06:14:00 +0000 (14:14 +0800)]
ripd: fix packet sending in authenticate mode

fix a bug when sending packets.
in authenticate mode but without any string,
no packet should send.

Signed-off-by: lyq140 <34637052+lyq140@users.noreply.github.com>
5 years agoripd: fix packet sending
lyq140 [Mon, 6 Aug 2018 02:46:58 +0000 (10:46 +0800)]
ripd: fix packet sending

fix a bug when sending a rip packet.
in authenticate mode but without any string,
no packet should send.

Signed-off-by: lyq140 <34637052+lyq140@users.noreply.github.com>
5 years agoMerge pull request #2775 from donaldsharp/stream_speedup
Rafael Zalamena [Sat, 4 Aug 2018 17:17:25 +0000 (14:17 -0300)]
Merge pull request #2775 from donaldsharp/stream_speedup

lib: Increase stream allocation speed.

5 years agoMerge pull request #2758 from donaldsharp/pim_join
Russ White [Sat, 4 Aug 2018 15:46:45 +0000 (11:46 -0400)]
Merge pull request #2758 from donaldsharp/pim_join

lib and pim silliness

5 years agoMerge pull request #2773 from donaldsharp/pim_ordering
Russ White [Sat, 4 Aug 2018 15:43:38 +0000 (11:43 -0400)]
Merge pull request #2773 from donaldsharp/pim_ordering

Pim ordering

5 years agoMerge pull request #2778 from donaldsharp/pim_leaks_and_invalids
Russ White [Sat, 4 Aug 2018 15:30:15 +0000 (11:30 -0400)]
Merge pull request #2778 from donaldsharp/pim_leaks_and_invalids

Pim leaks and invalids

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 agotools: improve checkpatch slicing
Quentin Young [Thu, 2 Aug 2018 18:34:37 +0000 (18:34 +0000)]
tools: improve checkpatch slicing

checkpatch cuts from the diff between the outputs of pre-patch and
post-patch runs of `checkpatch.pl`, but fixed-length greps sometimes
don't cut correctly.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
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 agolib, bgpd, ospf6d, ospfd, pimd: Allow finish to cleanup a bit more
Donald Sharp [Fri, 3 Aug 2018 12:18:11 +0000 (08:18 -0400)]
lib, bgpd, ospf6d, ospfd, pimd: Allow finish to cleanup a bit more

When calling route_map_finish, every place that we do we must
first set the deletion event to NULL, or we will create an infinite
loop, if we are using the delayed route-map application code.
As such we might as well just make the route_map_finish code
do this work, as that there is really no viable alternative here
and route_map_finish should only be called on shutdown.

This fixes an infinite loop in zebra on shutdown when there
are route-maps.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoisisd: fix refcounting in isis_route.c
Christian Franke [Wed, 1 Aug 2018 11:23:56 +0000 (13:23 +0200)]
isisd: fix refcounting in isis_route.c

This fixes multiple issues and inefficiencies regarding the usage of
route_tables in isis_route.c and removes some memory leaks.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoisisd: make spf code dst-src aware
Christian Franke [Thu, 26 Jul 2018 20:53:08 +0000 (22:53 +0200)]
isisd: make spf code dst-src aware

Take the source-prefix sub-TLV into consideration when running SPF
and support creation/deletion of dst-src routes as result.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoisisd: don't infer spftree from address family
Christian Franke [Thu, 26 Jul 2018 13:08:11 +0000 (15:08 +0200)]
isisd: don't infer spftree from address family

Instead of using the address family to determine which spftree structure
should be used, specify it explicitly. With the advent of ipv6 dst-src
routing, the tree cannot be uniquely determined from the family.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoisisd: make use of advanced concepts like arrays and loops
Christian Franke [Thu, 26 Jul 2018 10:57:38 +0000 (12:57 +0200)]
isisd: make use of advanced concepts like arrays and loops

Have an array of spftrees instead of a separate spftree and an
spftree6 for which all the code gets duplicated.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoisisd: fix isis_route_merge_verify logic
Christian Franke [Thu, 26 Jul 2018 08:02:15 +0000 (10:02 +0200)]
isisd: fix isis_route_merge_verify logic

This addresses two issues for L1L2 operation:

a) If an L1 route has ROUTE_ACTIVE unset and an L2 route for the same
destination has ROUTE_ACTIVE set, isisd would still put the L1 route
into the merged table. This causes the route for the destination to
get uninstalled from zebra until the next SPF run, which is incorrect.

To fix this, look at the ROUTE_ACTIVE flag and allow L2 routes to win
against L1 routes, when the L1 has ROUTE_ACTIVE unset.

b) If an L1 route wins against an existing L2 route, the ZEBRA_SYNCED
flag would remain on the L2 route. This leads to the problem that when
the L1 route disappears again, the L2 doesn't get reinstalled, since
isisd assumes it's already in the RIB because ZEBRA_SYNCED is set.

Solve this by clearing ZEBRA_SYNCED on L2 routes, if they lose against
an L1 route.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoisisd: fix redist_delete to also consider level-2
Christian Franke [Thu, 26 Jul 2018 08:01:47 +0000 (10:01 +0200)]
isisd: fix redist_delete to also consider level-2

There was an off-by-one error in redist_delete, so that routes redistributed
into level-2 could never be withdrawn.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoisisd: move route_table into spftree
Christian Franke [Tue, 24 Jul 2018 15:40:24 +0000 (17:40 +0200)]
isisd: move route_table into spftree

As isisd's route_tables are directly related to spf trees, move
the route tables into the spftree instead of maintaining them
alongside of the spftrees.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoisisd: learn and advertise IPv6 dst-src routes
Christian Franke [Sun, 22 Jul 2018 19:49:02 +0000 (15:49 -0400)]
isisd: learn and advertise IPv6 dst-src routes

Receive IPv6 dst-src routes from zebra and advertise them in our LSPs
if so configured.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoisisd: add debug message if adjacency is ignored because IP is unusable
Christian Franke [Sun, 22 Jul 2018 17:59:43 +0000 (13:59 -0400)]
isisd: add debug message if adjacency is ignored because IP is unusable

isisd verifies whether the neighboring IPv4 addresses overlap with its own
unless the interface is running in unnumbered mode. If no overlap is found
and IPv6 is also not enabled, IIHs will be ignored.

Add a debug message for this case, to avoid people wondering why adjacencies
are not coming up.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agopimd: On shutdown ensure wheel exists
Donald Sharp [Fri, 3 Aug 2018 03:31:53 +0000 (23:31 -0400)]
pimd: On shutdown ensure wheel exists

On shutdown and cleaning up pim_upstream ensure that the
upstream_sg_wheel still exists to remove item from.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Cleanup msdp.mg on shutdown
Donald Sharp [Fri, 3 Aug 2018 03:07:08 +0000 (23:07 -0400)]
pimd: Cleanup msdp.mg on shutdown

When shutting down PIM, ensure that hte pim->msdp.mg is cleaned up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Cleanup bfd memory on shutdown
Donald Sharp [Fri, 3 Aug 2018 02:56:55 +0000 (22:56 -0400)]
pimd: Cleanup bfd memory on shutdown

When shutting down pim, ensure that we cleanup bfd memory

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Fix crash on shutdown in oil
Donald Sharp [Fri, 3 Aug 2018 00:27:53 +0000 (20:27 -0400)]
pimd: Fix crash on shutdown in oil

When shutting down, do not free oil information after
interface information since we use the data there to
do so.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Don't leak wheel memory
Donald Sharp [Fri, 3 Aug 2018 00:25:41 +0000 (20:25 -0400)]
pimd: Don't leak wheel memory

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Properly cleanup ssm
Donald Sharp [Fri, 3 Aug 2018 00:06:15 +0000 (20:06 -0400)]
pimd: Properly cleanup ssm

Properly cleanup the ssm data structure on termination.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Cleanup rp_info->plist
Donald Sharp [Fri, 3 Aug 2018 00:02:13 +0000 (20:02 -0400)]
pimd: Cleanup rp_info->plist

PIM is leaking the plist data structure in some shutdown
cases.  Additionally trust XFREE

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopim: Clean up some data on shutdown in msdp
Donald Sharp [Thu, 2 Aug 2018 23:58:24 +0000 (19:58 -0400)]
pim: Clean up some data on shutdown in msdp

We were leaking some msdp hash backets and a msdp stream
data pointer on shutdown.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: No need to call zprivs_terminate 2 times
Donald Sharp [Thu, 2 Aug 2018 23:52:15 +0000 (19:52 -0400)]
pimd: No need to call zprivs_terminate 2 times

frr_fini and pim_free both call zprivs_terminate.  There is
no need for pim_free to call this function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Increase stream allocation speed.
Donald Sharp [Thu, 2 Aug 2018 17:42:15 +0000 (13:42 -0400)]
lib: Increase stream allocation speed.

Modify stream_new in this way:

1) ALLOC allocations do not fail, they cause a crash so remove
if tests for it.

2) Modify usage of XCALLOC to XMALLOC and then hand set all the
relevant data in the stream pointer.

With this modification stream allocation of 10000000 streams at
10k bytes each reduced from on average 1.43 seconds to 0.65 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agovtysh: Respect order dependancy of some pim commands
Donald Sharp [Thu, 2 Aug 2018 14:36:59 +0000 (10:36 -0400)]
vtysh: Respect order dependancy of some pim commands

If `ip igmp query-max-respone-time ` is specified allow it
to show up before `ip igmp query-interval ` since there
are order dependancies that may show up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
5 years agopimd: Modify order of command output for vty output
Donald Sharp [Thu, 2 Aug 2018 14:35:14 +0000 (10:35 -0400)]
pimd: Modify order of command output for vty output

If `ip igmp query-max-response-time` is set move it to
display first as that this command has order dependencies
on `ip igmp query-interval`.

Ticket: CM-21598
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Fix vrf check output to only have 1 line
Donald Sharp [Tue, 31 Jul 2018 19:28:04 +0000 (15:28 -0400)]
lib: Fix vrf check output to only have 1 line

When we issue this command, we are getting:

robot# show ip route vrf green json
{}
% VRF green not found
robot# show ip route vrf green
% VRF green not found
% VRF green not found
robot#

Fix the command so it only displays one line of output
for json or non-json output.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Only need 1 return from a function
Donald Sharp [Tue, 31 Jul 2018 19:19:47 +0000 (15:19 -0400)]
pimd: Only need 1 return from a function

When there is a return at the end of a function, there
is no need for another one immediately after it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: pim_socket_join_source is only called from one place
Donald Sharp [Tue, 31 Jul 2018 19:11:42 +0000 (15:11 -0400)]
pimd: pim_socket_join_source is only called from one place

The pim_socket_join_source function only ever calls
pim_igmp_join_source and pim_socket_join_source is only
called from 1 place.  Skip the level of indirection.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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>