]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #2992 from opensourcerouting/large_as_path_fix
Donald Sharp [Mon, 24 Sep 2018 13:37:47 +0000 (09:37 -0400)]
Merge pull request #2992 from opensourcerouting/large_as_path_fix

bgpd: Fix for large AS paths which are split into segments

5 years agoMerge pull request #3071 from donaldsharp/fix_vrf_name
Lou Berger [Sun, 23 Sep 2018 10:35:14 +0000 (06:35 -0400)]
Merge pull request #3071 from donaldsharp/fix_vrf_name

lib: Allow useful display of default vrf name

5 years agoMerge pull request #3022 from donaldsharp/bgp_abstraction
Lou Berger [Sun, 23 Sep 2018 10:31:31 +0000 (06:31 -0400)]
Merge pull request #3022 from donaldsharp/bgp_abstraction

bgp_node abstraction

5 years agobgpd: Abstract bgp_nexthop_cache retrieving/setting from info pointer
Donald Sharp [Wed, 19 Sep 2018 12:20:37 +0000 (08:20 -0400)]
bgpd: Abstract bgp_nexthop_cache retrieving/setting from info pointer

The bgp_nexthop_cache data is stored as a void pointer in `struct bgp_node`.
Abstract retrieval of this data and setting of this data
into functions so that in the future we can move around
what is stored in bgp_node.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3010 from opensourcerouting/no-frr-thread-id
Lou Berger [Sat, 22 Sep 2018 19:02:09 +0000 (15:02 -0400)]
Merge pull request #3010 from opensourcerouting/no-frr-thread-id

lib: frr_pthread minor simplification

5 years agobgpd: Abstract bgp_connected_ref retrieving/setting from info pointer
Donald Sharp [Mon, 30 Jul 2018 14:46:00 +0000 (10:46 -0400)]
bgpd: Abstract bgp_connected_ref retrieving/setting from info pointer

The bgp_connected_ref data is stored as a void pointer in `struct bgp_node`.
Abstract retrieval of this data and setting of this data
into functions so that in the future we can move around
what is stored in bgp_node.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Abstract bgp_static retrieving/setting from info pointer
Donald Sharp [Mon, 30 Jul 2018 14:30:41 +0000 (10:30 -0400)]
bgpd: Abstract bgp_static retrieving/setting from info pointer

The bgp_static data is stored as a void pointer in `struct bgp_node`.
Abstract retrieval of this data and setting of this data
into functions so that in the future we can move around
what is stored in bgp_node.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Abstract distance retrieving/setting from info pointer
Donald Sharp [Mon, 30 Jul 2018 14:29:28 +0000 (10:29 -0400)]
bgpd: Abstract distance retrieving/setting from info pointer

The bgp_distance data is stored as a void pointer in `struct bgp_node`.
Abstract retrieval of this data and setting of this data
into functions so that in the future we can move around
what is stored in bgp_node.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Abstract aggregate retrieving/setting from info pointer
Donald Sharp [Mon, 30 Jul 2018 12:50:47 +0000 (08:50 -0400)]
bgpd: Abstract aggregate retrieving/setting from info pointer

The aggregate data is stored as a void pointer in `struct bgp_node`.
Abstract retrieval of this data and setting of this data
into functions so that in the future we can move around
what is stored in bgp_node.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Allow useful display of default vrf name
Donald Sharp [Sat, 22 Sep 2018 16:10:02 +0000 (12:10 -0400)]
lib: Allow useful display of default vrf name

When entering a interface name and you fat-finger it
actually display some useful information about the vrf
we are in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3021 from donaldsharp/more_upstream
David Lamparter [Fri, 21 Sep 2018 21:06:26 +0000 (23:06 +0200)]
Merge pull request #3021 from donaldsharp/more_upstream

zebra_vxlan fixes

5 years agoMerge pull request #3068 from qlyoung/doc-ospf-multi-instance
David Lamparter [Fri, 21 Sep 2018 21:03:19 +0000 (23:03 +0200)]
Merge pull request #3068 from qlyoung/doc-ospf-multi-instance

ospfd: add docs on multi-instance ospf

5 years agoMerge pull request #2978 from ton31337/fix/default_originate_after_second_enter
David Lamparter [Fri, 21 Sep 2018 20:57:28 +0000 (22:57 +0200)]
Merge pull request #2978 from ton31337/fix/default_originate_after_second_enter

osfpd: Install default route after second try instantly

5 years agoMerge pull request #3067 from donaldsharp/pim_fixes
Jafar Al-Gharaibeh [Fri, 21 Sep 2018 18:50:40 +0000 (13:50 -0500)]
Merge pull request #3067 from donaldsharp/pim_fixes

Pim fixes

5 years agoospfd: add docs on multi-instance ospf
Quentin Young [Fri, 21 Sep 2018 18:31:05 +0000 (18:31 +0000)]
ospfd: add docs on multi-instance ospf

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #3016 from pacovn/label_manager_fixes
Donald Sharp [Fri, 21 Sep 2018 18:03:05 +0000 (14:03 -0400)]
Merge pull request #3016 from pacovn/label_manager_fixes

Label manager fixes

5 years agoMerge pull request #3057 from pacovn/Coverity_1472965_1472966_Dereference_before_null...
Donald Sharp [Fri, 21 Sep 2018 17:37:33 +0000 (13:37 -0400)]
Merge pull request #3057 from pacovn/Coverity_1472965_1472966_Dereference_before_null_check

bgpd: null check (Coverity 1472965 1472966)

5 years agopimd: blackhole traffic when we are not DR for Stream received
Donald Sharp [Fri, 21 Sep 2018 15:41:46 +0000 (11:41 -0400)]
pimd: blackhole traffic when we are not DR for Stream received

Suppose we have a bridge with a host and two routers attached
to it.

r1     r2
|      |
--------
    |
  host

host is sending traffic.
r1 and r2 are pim neighbors and r2 is the DR.

Both r1 and r2 will receive data from the stream up the pim
kernel socket.  r1 will notice that it is not the DR and
stop processing in pim.  This code adds a bit more code to blackhole
the route when r1 detects it is not the DR in this scenario.

This is being done because the kernel is both keeping state and
sending data to the pim process to continue processing this.
Additionally if we happen to be running this on a asic, then
blackholing the route in the asic can save a significant amount
of cpu time handling this situation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Add a debug to tell why we are not creating upsteam state
Donald Sharp [Fri, 21 Sep 2018 14:28:57 +0000 (10:28 -0400)]
pimd: Add a debug to tell why we are not creating upsteam state

When we decide we are not the right pim process to add upstream state
for the igmp state received, notice this in a debug to make life
easier to debug.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Add some extra information to a show command
Donald Sharp [Fri, 21 Sep 2018 14:17:48 +0000 (10:17 -0400)]
pimd: Add some extra information to a show command

The tracking of who have drpriority on an interface
in pim was not displayed anywhere.  Add to the show
command for future reference.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: null check (Coverity 1472965 1472966)
F. Aragon [Thu, 20 Sep 2018 14:00:40 +0000 (16:00 +0200)]
bgpd: null check (Coverity 1472965 1472966)

There were checks for null pointer after being dereferenced. Checks have
been removed (we've discussed the no need of adding assert()'s because
of similar code not requiring them).

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #3056 from pacovn/Coverity_1473285_Explicit_null_dereferenced
Quentin Young [Thu, 20 Sep 2018 19:38:33 +0000 (15:38 -0400)]
Merge pull request #3056 from pacovn/Coverity_1473285_Explicit_null_dereferenced

isisd: null check (Coverity 1473285)

5 years agoMerge pull request #3058 from pacovn/Coverity_1399484_Dereference_null_return_value
Donald Sharp [Thu, 20 Sep 2018 17:16:30 +0000 (13:16 -0400)]
Merge pull request #3058 from pacovn/Coverity_1399484_Dereference_null_return_value

tools: null check (Coverity 1399484)

5 years agoMerge pull request #3062 from pacovn/static_analysis__redundant_parentheses
Donald Sharp [Thu, 20 Sep 2018 17:13:55 +0000 (13:13 -0400)]
Merge pull request #3062 from pacovn/static_analysis__redundant_parentheses

lib: redundant parentheses (SA)

5 years agoMerge pull request #3060 from pacovn/Coverity_1399196_Unchecked_return_value
Donald Sharp [Thu, 20 Sep 2018 17:12:06 +0000 (13:12 -0400)]
Merge pull request #3060 from pacovn/Coverity_1399196_Unchecked_return_value

tools: return check (Coverity 1399196)

5 years agoMerge pull request #3061 from pacovn/static_analysis__Wgnu-redeclared-enum
Donald Sharp [Thu, 20 Sep 2018 17:11:16 +0000 (13:11 -0400)]
Merge pull request #3061 from pacovn/static_analysis__Wgnu-redeclared-enum

zebra: redeclaration fix (SA)

5 years agolib: redundant parentheses (SA)
F. Aragon [Thu, 20 Sep 2018 15:36:21 +0000 (17:36 +0200)]
lib: redundant parentheses (SA)

Redundant parentheses surrounding declarator removed.

Can be detected via static analysis with e.g.

./configure CFLAGS=-Wredundant-parens CC=clang

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agozebra: redeclaration fix (SA)
F. Aragon [Thu, 20 Sep 2018 15:25:40 +0000 (17:25 +0200)]
zebra: redeclaration fix (SA)

Unnecesary redeclaration of already-defined enum 'dp_results' removed.

Can be detected via static analysis with e.g.

./configure CFLAGS=-Wgnu-redeclared-enum CC=clang

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agotools: return check (Coverity 1399196)
F. Aragon [Thu, 20 Sep 2018 14:42:31 +0000 (16:42 +0200)]
tools: return check (Coverity 1399196)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agotools: null check (Coverity 1399484)
F. Aragon [Thu, 20 Sep 2018 14:23:52 +0000 (16:23 +0200)]
tools: null check (Coverity 1399484)

Fixed using XCALLOC(MTYPE_TMP, ...) instead of calloc(...) because of the
error handling (XCALLOC checks + log + abort through memory_oom())

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoisisd: null check (Coverity 1473285)
F. Aragon [Thu, 20 Sep 2018 13:39:00 +0000 (15:39 +0200)]
isisd: null check (Coverity 1473285)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoosfpd: Install default route after second try instantly
Donatas Abraitis [Wed, 5 Sep 2018 15:01:47 +0000 (18:01 +0300)]
osfpd: Install default route after second try instantly

Signed-off-by: Donatas Abraitis donatas.abraitis@gmail.com
5 years agotools/checkpatch.pl: recognize _Atomic as modifier
David Lamparter [Wed, 19 Sep 2018 20:05:32 +0000 (22:05 +0200)]
tools/checkpatch.pl: recognize _Atomic as modifier

checkpatch is slightly confused by _Atomic, causing some spurious
warnings.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: remove unused frr_pthread_yield()
David Lamparter [Wed, 12 Sep 2018 19:25:49 +0000 (21:25 +0200)]
lib: remove unused frr_pthread_yield()

OS-level yield is generally a bad and possibly dangerous idea.  If the
thread should be suspended, there should always be something to wait on,
or it turns into busy waiting.  And if it's "just giving something else
the chance to run" - that's the kernel's job to determine, and the
kernel will do so while considering priorities, cgroups, and whatnot.
Let it do its job.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: remove frr_pthread->id
David Lamparter [Wed, 12 Sep 2018 19:23:52 +0000 (21:23 +0200)]
lib: remove frr_pthread->id

All I can see is an unneccessary complication.  If there's some purpose
here it needs to be documented...

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd: fix test (using bgp instance 0)
F. Aragon [Thu, 13 Sep 2018 12:48:21 +0000 (14:48 +0200)]
bgpd: fix test (using bgp instance 0)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agozebra: filter zebra messages (label manager)
F. Aragon [Tue, 4 Sep 2018 12:37:00 +0000 (14:37 +0200)]
zebra: filter zebra messages (label manager)

This change makes the zebra acting as label manager proxy not to relay non-LM
messages to clients that a zebra acting in non-proxy mode may send to it. Also,
the existing code does not schedule a rcv in case of relay_response_back
returns -1. This patch re-schedules reads on the socket even in case such a
function returns -1 by calling thread_add_read().

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd, doc, ldpd, lib, tests, zebra: LM fixes
paco [Thu, 7 Jun 2018 13:28:12 +0000 (15:28 +0200)]
bgpd, doc, ldpd, lib, tests, zebra: LM fixes

Corrections so that the BGP daemon can work with the label manager properly
through a label-manager proxy. Details:

- Correction so the BGP daemon behind a proxy label manager gets the range
  correctly (-I added to the BGP daemon, to set the daemon instance id)
- For the BGP case, added an asynchronous label manager connect command so
  the labels get recycled in case of a BGP daemon reconnection. With this,
  BGPd and LDPd would behave similarly.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agozebra: Cleanup comments to appropriately match style
Donald Sharp [Mon, 17 Sep 2018 16:13:15 +0000 (12:13 -0400)]
zebra: Cleanup comments to appropriately match style

The block comments from a couple commits were not following
proper style.  Fix.

Fix SA warning that had snuck in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: resolve link dependencies post nldump
Anuradha Karuppiah [Wed, 12 Sep 2018 18:33:51 +0000 (11:33 -0700)]
zebra: resolve link dependencies post nldump

Netdevices are not sorted in any fashion by the kernel during the initial
interface nldump. So you can get an upper device (such as an SVI) before
its corresponding lower device (bridge).

To fix this problem we skip resolving link dependencies during handling of
nldump notifications. Resolving instead at the end (when all the devices
are present)

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Ticket: CM-22388, CM-21796
Reviewed By: CCR-7845
Testing Done:
1. verified on a setup with missing linkages
2. automation - evpn-min

5 years agozebra: Fix neighbor update to BGP
vivek [Mon, 10 Sep 2018 17:19:41 +0000 (10:19 -0700)]
zebra: Fix neighbor update to BGP

Ensure that when the is_router condition changes for a locally learnt
neighbor, it is informed to BGP only if it is active i.e., the MAC is
also locally learnt.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
Ticket: CM-22288
Reviewed By: CCR-7832
Testing Done:
1. Failed test
2. vxlan_routing_test.py

5 years agozebra: Use boolean for certain VxLAN-EVPN flags
vivek [Mon, 10 Sep 2018 17:13:20 +0000 (10:13 -0700)]
zebra: Use boolean for certain VxLAN-EVPN flags

Use boolean variables instead of unsigned int for certain VxLAN-EVPN
flags which are really used as boolean.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
Ticket: CM-22288
Reviewed By: CCR-7832
Testing Done:
Along with a subsequent, related commit

5 years agozebra: Uninstall remote MACs from kernel appropriately
vivek [Wed, 29 Aug 2018 00:22:04 +0000 (17:22 -0700)]
zebra: Uninstall remote MACs from kernel appropriately

When a remote MAC goes away, but there are neighbors referring to it,
ensure that when the last remote neighbor goes away, the MAC is
uninstalled from the kernel and no longer considered as remote.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
Ticket: CM-22130
Reviewed By: CCR-7777
Testing Done:
1. Replicated failed scenario and verified with fix.
2. evpn-min

5 years agozebra: Remove unused parameter in MAC delete
vivek [Wed, 29 Aug 2018 00:02:40 +0000 (17:02 -0700)]
zebra: Remove unused parameter in MAC delete

When a MAC moves from local to remote, a replace is allowed, EVPN
no longer has to delete the local MAC before installing the remote
MAC.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoMerge pull request #3017 from pacovn/devbuild_Wshadow_flag
David Lamparter [Tue, 18 Sep 2018 14:31:23 +0000 (16:31 +0200)]
Merge pull request #3017 from pacovn/devbuild_Wshadow_flag

build: add -Wshadow to the dev build

5 years agoMerge pull request #3042 from donaldsharp/pim_startup
David Lamparter [Tue, 18 Sep 2018 14:24:10 +0000 (16:24 +0200)]
Merge pull request #3042 from donaldsharp/pim_startup

Pim startup for non-integrated config

5 years agoMerge pull request #3041 from qlyoung/doc-cli-dep-period-length
David Lamparter [Tue, 18 Sep 2018 10:49:09 +0000 (12:49 +0200)]
Merge pull request #3041 from qlyoung/doc-cli-dep-period-length

doc: document CLI deprecation period length

5 years agoMerge pull request #3038 from donaldsharp/pim_table_id
David Lamparter [Tue, 18 Sep 2018 10:48:45 +0000 (12:48 +0200)]
Merge pull request #3038 from donaldsharp/pim_table_id

Pim table

5 years agoMerge pull request #3015 from donaldsharp/no_fast_failover_and_vrf
David Lamparter [Tue, 18 Sep 2018 10:47:54 +0000 (12:47 +0200)]
Merge pull request #3015 from donaldsharp/no_fast_failover_and_vrf

bgpd: Using no bgp fast-external-failover prevents vrf intf moves

5 years agoMerge branch 'pr/2986'
David Lamparter [Tue, 18 Sep 2018 10:46:42 +0000 (12:46 +0200)]
Merge branch 'pr/2986'

Conflicts:
bgpd/bgp_network.c (BGP_ERR_* -> EC_BGP_*)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3040 from pacovn/static_analysis__drop_const_1
Quentin Young [Mon, 17 Sep 2018 19:25:49 +0000 (15:25 -0400)]
Merge pull request #3040 from pacovn/static_analysis__drop_const_1

bgpd isisd ldpd lib: const drop fixes (SA)

5 years agopimd: use bool instead of int to pass true/false
Donald Sharp [Mon, 17 Sep 2018 18:09:06 +0000 (14:09 -0400)]
pimd: use bool instead of int to pass true/false

In pim_if_new use bool instead of an int to pass
true/false values for what we should create the
pim interface type for.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Actually create vif's in non-integrated config
Donald Sharp [Mon, 17 Sep 2018 17:58:59 +0000 (13:58 -0400)]
pimd: Actually create vif's in non-integrated config

The startup of a non-integrated config was not properly
allowing for startup to create the vif when we have
not learned about the interface we are trying to configure
at this point in time.  Actually notice when we are
trying to create a pimreg device or not to properly
notice when to attempt to create the vif or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd isisd ldpd lib: const drop fixes (SA)
F. Aragon [Mon, 17 Sep 2018 16:22:59 +0000 (18:22 +0200)]
bgpd isisd ldpd lib: const drop fixes (SA)

Can be detected with e.g. ./configure CFLAGS=-Wcast-qual CC=clang

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agodoc: document CLI deprecation period length
Quentin Young [Mon, 17 Sep 2018 16:48:11 +0000 (16:48 +0000)]
doc: document CLI deprecation period length

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobuild: add -Wshadow to the dev build
F. Aragon [Thu, 13 Sep 2018 14:42:30 +0000 (16:42 +0200)]
build: add -Wshadow to the dev build

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agozebra: Send correct default vrf tableid for MROUTE stats
Donald Sharp [Mon, 17 Sep 2018 13:18:40 +0000 (09:18 -0400)]
zebra: Send correct default vrf tableid for MROUTE stats

So the linux kernel uses the RT_TABLE_MAIN for the table
id used for ip routing.  The multicast routing tables use
RT_TABLE_DEFAULT.  We changed the internal code of zebra_vrf
a few months back to use RT_TABLE_MAIN as the tableid to
use.  This caused the pim sg stats to stop working because
of the kernel bug where it uses a different table
for ip routing and ip multicast.

Put a bit of a special case in to do the right thing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Add some additional vrf debug for retrieving mroute info
Donald Sharp [Mon, 17 Sep 2018 13:13:20 +0000 (09:13 -0400)]
zebra: Add some additional vrf debug for retrieving mroute info

When debugging the mroute code path in zebra, add a bit of additional
data to allow us to know what is going on a bit more.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3031 from pacovn/static_analysis__Wcomma
Lou Berger [Mon, 17 Sep 2018 10:03:49 +0000 (06:03 -0400)]
Merge pull request #3031 from pacovn/static_analysis__Wcomma

bgpd isisd zebra: misuse of comma operator

5 years agoMerge pull request #3036 from donaldsharp/kernel_is_a_mernel
David Lamparter [Sat, 15 Sep 2018 15:38:08 +0000 (17:38 +0200)]
Merge pull request #3036 from donaldsharp/kernel_is_a_mernel

Kernel is a mernel

5 years agoMerge pull request #3035 from donaldsharp/the_table_in_all_of_us
David Lamparter [Sat, 15 Sep 2018 15:37:00 +0000 (17:37 +0200)]
Merge pull request #3035 from donaldsharp/the_table_in_all_of_us

staticd: Allow table_id to be a distinguisher for installation

5 years agozebra: Newer kernels send data about mroute changes
Donald Sharp [Fri, 14 Sep 2018 21:54:11 +0000 (17:54 -0400)]
zebra: Newer kernels send data about mroute changes

Newer linux kernels apparently send data down the netlink
bus for the creation of mroutes.  Add a bit of code
to notice this and to handle it appropriately( ie do
nothing at this point in time ) as that the correct
place to do this is in the pim socket in pimd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Print out netlink message type instead of number
Donald Sharp [Fri, 14 Sep 2018 21:48:51 +0000 (17:48 -0400)]
zebra: Print out netlink message type instead of number

When we are displaying data about a netlink message
in debugs or errors, print out the message type
as a string instead of a number.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agostaticd: Allow table_id to be a distinguisher for installation
Donald Sharp [Fri, 14 Sep 2018 20:30:17 +0000 (16:30 -0400)]
staticd: Allow table_id to be a distinguisher for installation

The table_id should be a discriminator in the installation of
static routes into zebra from staticd.  Add this to allow the end
user to do something like this:

ip route 4.5.6.7/32 192.168.209.44
ip route 4.5.6.7/32 192.168.209.44 table 3000
ip route 4.5.6.7/32 192.168.209.45 table 3000

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

K>* 0.0.0.0/0 [0/101] via 192.168.201.1, enp0s3, 00:01:40
S>* 4.3.2.1/32 [1/0] via 192.168.210.4, enp0s10, 00:01:35
S>* 4.3.2.2/32 [1/0] via 192.168.209.4, enp0s9, 00:01:35
S>* 4.5.6.0/26 [1/0] via 192.168.210.4, enp0s10, 00:01:35
S>* 4.5.6.7/32 [1/0] via 192.168.209.44, enp0s9, 00:01:35
C>* 192.168.201.0/24 is directly connected, enp0s3, 00:01:40
C>* 192.168.208.0/24 is directly connected, enp0s8, 00:01:40
C>* 192.168.209.0/24 is directly connected, enp0s9, 00:01:40
C>* 192.168.210.0/24 is directly connected, enp0s10, 00:01:40
robot# show ip route table 3000
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route

S>* 4.5.6.7/32 [1/0] via 192.168.209.44, enp0s9, 00:00:55
  *                  via 192.168.209.45, enp0s9, 00:00:55
robot#

Fixes: #2954
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3018 from donaldsharp/twheel_names
David Lamparter [Fri, 14 Sep 2018 15:57:19 +0000 (17:57 +0200)]
Merge pull request #3018 from donaldsharp/twheel_names

Twheel names

5 years agoMerge pull request #3030 from pacovn/fp_type_fixes1
David Lamparter [Fri, 14 Sep 2018 15:55:50 +0000 (17:55 +0200)]
Merge pull request #3030 from pacovn/fp_type_fixes1

bgpd: type fix

5 years agoMerge pull request #3023 from qlyoung/ultimate-warning-reference-cards-rename
David Lamparter [Fri, 14 Sep 2018 15:35:58 +0000 (17:35 +0200)]
Merge pull request #3023 from qlyoung/ultimate-warning-reference-cards-rename

warning reference cards rename

5 years agobgpd isisd zebra: misuse of comma operator
F. Aragon [Fri, 14 Sep 2018 13:47:41 +0000 (15:47 +0200)]
bgpd isisd zebra: misuse of comma operator

Detected using ./configure CFLAGS=-Wcomma CC=clang

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: type fix
F. Aragon [Fri, 14 Sep 2018 12:53:55 +0000 (14:53 +0200)]
bgpd: type fix

For tracking the last state of the penalty (struct bgp_damp_info) a 'double'
type was used instead of using the 'unsigned int' being used in the structure.

Detected using ./configure CFLAGS=-Wfloat-equal CC=clang

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years ago*: style for EC replacements
Quentin Young [Thu, 13 Sep 2018 19:38:57 +0000 (19:38 +0000)]
*: style for EC replacements

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years ago*: LIB_[ERR|WARN] -> EC_LIB
Quentin Young [Thu, 13 Sep 2018 19:34:28 +0000 (19:34 +0000)]
*: LIB_[ERR|WARN] -> EC_LIB

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agozebra: ZEBRA_[ERR|WARN] -> EC_ZEBRA
Quentin Young [Thu, 13 Sep 2018 19:21:05 +0000 (19:21 +0000)]
zebra: ZEBRA_[ERR|WARN] -> EC_ZEBRA

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agowatchfrr: WATCHFRR_[ERR|WARN] -> EC_WATCHFRR
Quentin Young [Thu, 13 Sep 2018 19:16:02 +0000 (19:16 +0000)]
watchfrr: WATCHFRR_[ERR|WARN] -> EC_WATCHFRR

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoripd: RIP_[ERR|WARN] -> EC_RIP
Quentin Young [Thu, 13 Sep 2018 19:14:28 +0000 (19:14 +0000)]
ripd: RIP_[ERR|WARN] -> EC_RIP

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agopimd: PIM_[ERR|WARN] -> EC_PIM
Quentin Young [Thu, 13 Sep 2018 19:12:58 +0000 (19:12 +0000)]
pimd: PIM_[ERR|WARN] -> EC_PIM

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoisisd: ISIS_[ERR|WARN] -> EC_ISIS
Quentin Young [Thu, 13 Sep 2018 19:12:08 +0000 (19:12 +0000)]
isisd: ISIS_[ERR|WARN] -> EC_ISIS

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoeigrpd: EIGRP_[ERR|WARN] -> EC_EIGRP
Quentin Young [Thu, 13 Sep 2018 19:04:11 +0000 (19:04 +0000)]
eigrpd: EIGRP_[ERR|WARN] -> EC_EIGRP

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobabeld: BABEL_[ERR|WARN] -> EC_BABEL
Quentin Young [Thu, 13 Sep 2018 19:01:19 +0000 (19:01 +0000)]
babeld: BABEL_[ERR|WARN] -> EC_BABEL

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agonhrpd: NHRP_[ERR|WARN] -> EC_NHRP
Quentin Young [Thu, 13 Sep 2018 18:59:07 +0000 (18:59 +0000)]
nhrpd: NHRP_[ERR|WARN] -> EC_NHRP

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoospfd: OSPF_[ERR|WARN] -> EC_OSPF
Quentin Young [Thu, 13 Sep 2018 18:56:04 +0000 (18:56 +0000)]
ospfd: OSPF_[ERR|WARN] -> EC_OSPF

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd: BGP_[WARN|ERR] -> EC_BGP
Quentin Young [Thu, 13 Sep 2018 18:23:42 +0000 (18:23 +0000)]
bgpd: BGP_[WARN|ERR] -> EC_BGP

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #3019 from pacovn/static_analysis__shadow_variables4
Donald Sharp [Thu, 13 Sep 2018 18:47:12 +0000 (14:47 -0400)]
Merge pull request #3019 from pacovn/static_analysis__shadow_variables4

bgpd lib ospf6d pbrd tests zebra: shadowing fixes

5 years agobgpd lib ospf6d pbrd tests zebra: shadowing fixes
F. Aragon [Thu, 13 Sep 2018 15:37:08 +0000 (17:37 +0200)]
bgpd lib ospf6d pbrd tests zebra: shadowing fixes

This fixes all remaining local variable shadowing cases

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agolib, pimd: Convert timer_wheel to use thread_execute_name
Donald Sharp [Thu, 30 Nov 2017 00:36:26 +0000 (19:36 -0500)]
lib, pimd: Convert timer_wheel to use thread_execute_name

Allow at timer wheel creation time the ability to specify a
name for what we want the 'show thread cpu' to show up as.

Modify pim to note this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Add thread_execute_name
Donald Sharp [Thu, 30 Nov 2017 00:35:30 +0000 (19:35 -0500)]
lib: Add thread_execute_name

Allow the user to specify a run name for display in
'show thread cpu' that is different than the function
name we are calling.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc: Update docs to mention 'no bgp fast-external-failover'
Donald Sharp [Thu, 13 Sep 2018 14:29:16 +0000 (10:29 -0400)]
doc: Update docs to mention 'no bgp fast-external-failover'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Using no bgp fast-external-failover prevents vrf intf moves
Donald Sharp [Thu, 13 Sep 2018 12:59:46 +0000 (08:59 -0400)]
bgpd: Using no bgp fast-external-failover prevents vrf intf moves

When using `no bgp fast-external-failover` and a interface moves
from one vrf into another we would not fully process the change.
Fix this code path.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3007 from pacovn/static_analysis__shadow_variables2
Donald Sharp [Thu, 13 Sep 2018 12:38:32 +0000 (08:38 -0400)]
Merge pull request #3007 from pacovn/static_analysis__shadow_variables2

lib vtysh zebra: variable shadowing fixes

5 years agoMerge pull request #3006 from pacovn/static_analysis__shadow_variables1
Donald Sharp [Thu, 13 Sep 2018 12:37:22 +0000 (08:37 -0400)]
Merge pull request #3006 from pacovn/static_analysis__shadow_variables1

bgpd isisd ospf6d ospfd: variable shadowing fixes

5 years agoMerge pull request #3009 from pacovn/static_analysis__shadow_variables3
Donald Sharp [Thu, 13 Sep 2018 12:35:47 +0000 (08:35 -0400)]
Merge pull request #3009 from pacovn/static_analysis__shadow_variables3

pimd ripd ripngd: variable shadowing fixes

5 years agoMerge pull request #3013 from pacovn/static_analysis__conditional_omitted_operand1
Donald Sharp [Thu, 13 Sep 2018 12:34:31 +0000 (08:34 -0400)]
Merge pull request #3013 from pacovn/static_analysis__conditional_omitted_operand1

nhrpd: missing operand added

5 years agonhrpd: missing operand added
F. Aragon [Thu, 13 Sep 2018 10:05:20 +0000 (12:05 +0200)]
nhrpd: missing operand added

Detected using -Wgnu-conditional-omitted-operand

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge branch 'warnings'
David Lamparter [Wed, 12 Sep 2018 20:00:04 +0000 (22:00 +0200)]
Merge branch 'warnings'

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge remote-tracking branch 'frr/master' into warnings
David Lamparter [Wed, 12 Sep 2018 19:58:39 +0000 (21:58 +0200)]
Merge remote-tracking branch 'frr/master' into warnings

Conflicts:
zebra/if_ioctl_solaris.c
zebra/rtread_getmsg.c

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd isisd ospf6d ospfd: variable shadowing fixes
F. Aragon [Wed, 12 Sep 2018 10:18:44 +0000 (12:18 +0200)]
bgpd isisd ospf6d ospfd: variable shadowing fixes

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd: Prevent possible crash when parsing v6 attributes
Donald Sharp [Thu, 6 Sep 2018 14:51:08 +0000 (10:51 -0400)]
bgpd: Prevent possible crash when parsing v6 attributes

The peer->nexthop.ifp pointer must be set when parsing the
attributes in bgp_mp_reach_parse, notice this
and fail gracefully.

Rework bgp_nexthop_set to remove the HAVE_CUMULUS and to
fail the nexthop_set when we have a zebra connection and
no ifp pointer, as that not havinga zebra connection and
no ifp pointer is legal.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd ripd ripngd: variable shadowing fixes
F. Aragon [Wed, 12 Sep 2018 10:55:31 +0000 (12:55 +0200)]
pimd ripd ripngd: variable shadowing fixes

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #3005 from patrasar/indentation_warnings
David Lamparter [Wed, 12 Sep 2018 10:39:26 +0000 (12:39 +0200)]
Merge pull request #3005 from patrasar/indentation_warnings

pimd: fix indentation warnings

5 years agolib vtysh zebra: variable shadowing fixes
F. Aragon [Wed, 12 Sep 2018 10:25:27 +0000 (12:25 +0200)]
lib vtysh zebra: variable shadowing fixes

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agopimd: fix indentation warnings
Sarita Patra [Wed, 12 Sep 2018 05:00:15 +0000 (22:00 -0700)]
pimd: fix indentation warnings

Signed-off-by: Sarita Patra <saritap@vmware.com>