Commit Graph

15273 Commits

Author SHA1 Message Date
Donald Sharp
2cb7234faf pimd: Add a flag PIM_NEXTHOP_ANSWER_RECEIVED
Track whether or not we have received an answer from
our query to do nexthop tracking.  This allows us to
go straight to doing a synchronous query for our
RPF.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-05 11:12:59 -04:00
Donald Sharp
43763b11d0 pimd: Tracking of RPF is *separate* from the lookup
Start the separation of tracking a Destination from the act
of looking it up.  The cojoining of these two concepts led
to a bunch of code that had to think about both problems leading
to weird situations and code paths.  Simplify the code by making
pim_ecmp_nexthop_search a static function and we only ever
call pim_ecmp_nexthop_lookup when we need to do a RPF().

pim_ecmp_nexthop_lookup will now attempt to find a stored pnc
and if it finds one it will report on the answer from it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-05 11:12:59 -04:00
Donald Sharp
5bd5131435 pimd: Determining if we are the RP should happen always
When creating new RP information from a `ip pim rp A.B.C.D/M A.B.C.D`
we should determine if we are the RP even if we can or cannot
determine if we have a path to the RP via RPF.

This is because we should determine if we are the RP based upon a
connected ip address match not whether or not we have a path to
the RPF.  We would normally think this is not important but
RPF is inherently asynchronous and we can have a state where
we have registered for nht but have not received the actual
path back yet from zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-05 11:12:59 -04:00
Donald Sharp
2ccc414b19 pimd: Zero out nhop being used
Zero out the lookup nexthop for usage, prevent a crash.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-05 11:12:59 -04:00
Jafar Al-Gharaibeh
5eec4615a2
Merge pull request #4083 from donaldsharp/static_reinstall_nexthops
staticd: Allow reinstall of static nexthops on vrf restart
2019-04-05 01:09:03 -05:00
Donald Sharp
f61f266a0e
Merge pull request #3548 from opensourcerouting/rip-vrf
rip(ng)d: add VRF support
2019-04-04 19:24:14 -04:00
Lou Berger
04ca9856ba
Merge pull request #3899 from ton31337/fix/remove_private_as_with_local_as
bgpd: Remove private AS numbers if local-as is defined
2019-04-04 16:08:42 -04:00
Quentin Young
0080f1f558
Merge pull request #4065 from mjstapp/fix_nexthop_compare
libs: nexthop comparison includes labels if present
2019-04-04 14:08:22 -04:00
Quentin Young
ab9bcaf4f8
Merge pull request #4080 from mjstapp/fix_nh_copy_const
libs: use const in copy_nexthops api
2019-04-04 13:52:01 -04:00
Quentin Young
5e694d8365
Merge pull request #4076 from dteach-rv/bgp_rpki_enable_fix
bgpd: Fix rpki command nodes.
2019-04-04 13:51:22 -04:00
Donald Sharp
6d2a4f3732 staticd: Allow reinstall of static nexthops on vrf restart
When staticd receives notification that a vrf that it is using
is back up into a state that can be used, go through and
mark all the si data structures nexthops as not installed.
This will allow us to complete the loop and reinstall routes
that need to be fully resolved.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-04 12:19:50 -04:00
Renato Westphal
467c39ab04
Merge pull request #4074 from qlyoung/remove-event-counter
lib: remove event_counter.[ch]
2019-04-04 12:03:12 -03:00
Mark Stapp
deff170e8b libs: use const in copy_nexthops api
Use const for the source arg to copy_nexthops().

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-04-04 10:54:10 -04:00
Lou Berger
9ffa0d2404
Merge pull request #4072 from chiragshah6/evpn_dev2
lib,bgpd: do not register nexthop 0.0.0.0 to nht
2019-04-04 10:20:43 -04:00
Lou Berger
e9890df15d
Merge pull request #4073 from donaldsharp/undebug_me_or_not
some cleanup across multiple daemons
2019-04-04 10:08:34 -04:00
Mark Stapp
59d11e7cd1
Merge pull request #4075 from qlyoung/reduce-exported-vars
lib: reduce exported var symbols
2019-04-04 12:18:49 +02:00
Jafar Al-Gharaibeh
dbf2f94c2c
Merge pull request #4060 from donaldsharp/pim_cherrybomb
Pim cherrybomb
2019-04-03 23:02:32 -05:00
root
9593708de0 bgpd: Fix rpki command nodes.
Move &rpki_cmd from VIEW to ENABLE.  A non-enabled session could
enter into the rpki command node and exit into glocalb config mode
without having to enable.

Move &show_rpki* from ENABLE to VIEW. Allow non-enabled user to
view cache state and prefix table state.

Signed-off-by: David Teach <dteach@routeviews.org>
2019-04-03 16:47:44 -04:00
Donald Sharp
fa0069c647 lib, pbrd, zebra: Fix size_t type printf warnings on obscure platforms
Use the correct printf formater for those obscure platforms that
we build against.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-03 16:39:50 -04:00
Quentin Young
c17faa4b10 lib: reduce exported var symbols
Don't need these in our DSO tables

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-04-03 20:34:18 +00:00
Quentin Young
fe7f26ce76 lib: remove event_counter.[ch]
goodbye spooky code

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-04-03 20:18:08 +00:00
Donald Sharp
fb09579ef7 bgpd, pimd: Remove undebug commands
The undebug XXX commands were deprecated over a year ago now,
time to nuke from on high.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-03 16:17:26 -04:00
Chirag Shah
1eb6c3eae6 *: do not register nexthop 0.0.0.0 to nht
Avoid tracking 0.0.0.0/32 nexthop with RIB.

When routes are aggregated,
the originate of the route becomes self.
Do not track nexthop self (0.0.0.0) with rib.

Ticket: CM-24248
Testing Done:

Before fix-

tor-11# show ip nht vrf all

VRF blue:
0.0.0.0
 unresolved
 Client list: bgp(fd 16)

VRF default:

VRF green:

VRF magenta:
0.0.0.0
 unresolved
 Client list: bgp(fd 16)

After fix-

tor-11# show ip nht vrf all

VRF blue:

VRF default:

VRF green:

VRF magenta:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-04-03 11:17:57 -07:00
Mark Stapp
c5dafdbf5c
Merge pull request #4070 from donaldsharp/static_fixup
staticd: Fix static routes that are not added in RIB after Null0 or v…
2019-04-03 17:04:15 +02:00
Adrian Ban
24a4626c0b staticd: Fix static routes that are not added in RIB after Null0 or vrf routes
When you add a static route like:

ip route 10.0.0.0/24 Null0
ip route 192.168.7.0/24 99.99.99.99 nexthop-vrf EVA

all routes after this command will be ignored by staticd and are not inserted in RIB.
This is the cause of return instead of continue in the for loop in static_nht_update_safi() function that is stopping the search in the routes list and is returning in the previous function without calling static_zebra_route_add() function.

This patch is fixing this issue.

Signed-off-by: Adrian Ban <bugs@abtelcom.ro>
2019-04-03 09:53:58 -04:00
Donald Sharp
f7af9a93e9
Merge pull request #3789 from mjstapp/dplane_skip_kernel
zebra: support skip-kernel for dataplane updates
2019-04-03 09:26:21 -04:00
Donald Sharp
06566f41f7
Merge pull request #3923 from Tuetuopay/evpn-session-vrf
Add support for EVPN session in the non-default VRF
2019-04-03 08:00:14 -04:00
Mark Stapp
55f93d4b0d libs: nexthop comparison includes labels if present
Adjust the nexthop comparison api so that it calls the label-
comparison api. Adjust the label-comp api so that "no labels"
is "equal".

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-04-03 04:25:21 -04:00
Sri Mohana Singamsetty
2b4e2584b5
Merge pull request #4018 from chiragshah6/evpn_dev
zebra: evpn dup detect handle ip state change
2019-04-02 20:28:33 -07:00
Donald Sharp
a4b43d14f0
Merge pull request #4053 from patrasar/3672
pimd: Introduce mroute_creation in channel oil data structure
2019-04-02 13:47:28 -04:00
Donald Sharp
ccd7df5099
Merge pull request #4061 from mjstapp/fix_rtm_resolve
zebra: conditionalize RTM_RESOLVE flag
2019-04-02 12:02:17 -04:00
Renato Westphal
cfbbb0ca6e
Merge pull request #4051 from qlyoung/doc-update-build-docs
doc: remove unneeded build deps
2019-04-02 12:59:51 -03:00
Russ White
febe440bc4
Merge pull request #3931 from chiragshah6/evpn_dev1
bgpd: vrf route-leak router-id change reflect to vpn auto rd rt
2019-04-02 11:59:35 -04:00
Mark Stapp
5f11807bc6 zebra: conditionalize RTM_RESOLVE flag
RTM_RESOLVE may not be present; conditionalize zebra's reference
to it.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-04-02 09:26:45 -04:00
Donald Sharp
ade155e146 pimd: pim_nexthop_lookup should return true/false
The current reverse logic led to this code construct
if (!pim_nexthop_lookup(...)) {
	//Do something successfull
}

This is backwards and will cause logic errors when people
use this code.  Fix to use true/false for success/failure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-02 08:20:36 -04:00
Donald Sharp
c9cd7fbc3f pimd: Limit lookup of neighbor since we know we have one
When a new pim neighbor comes up, we need to go through and
mark nexthops that we have received from zebra for reachability
tracking so we can refigure stuff.  If we pass in the new neighbor
we can limit the search to those nexthops out the interface that
the new neighbor has come up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-02 08:20:02 -04:00
Donald Sharp
377e4f99bb pimd: Remove pim_resolve_upstream_nh
The pim_resolve_upstream_nh function call is no longer being used
let's remove it from the code base.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-04-02 08:19:48 -04:00
Jafar Al-Gharaibeh
aee1decce2
Merge pull request #4040 from donaldsharp/pim_cleanup
Pim cleanup
2019-04-01 10:25:07 -05:00
Sarita Patra
e7cd85bda7 pimd: Introduce mroute_creation in channel oil data structure
Issue: (*,G) mroute uptime is not updated in mroute table,
after deleting and adding the RP

Root cause: When RP gets deleted or becomes not reachable, then
we un-install the entry from the kernel, but still maintains the
entry in the stack. When  RP gets re-configured or becomes reachable,
"show ip mroute" shows the uptime, when the channel_oil gets created.

Fix: Introduce a new time mroute_creation in the channel_oil, gets
updated when mroute gets installed in the kernel.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2019-03-31 23:38:28 -07:00
Russ White
ecedbaa13b
Merge pull request #3932 from nitinsoniism/bgp_gshut_clear_soft_in_out
bgpd: handle all afi safi while bgp clear soft
2019-03-31 17:05:14 -04:00
Russ White
6b74e55666
Merge pull request #4048 from FRRouting/qlyoung-patch-1
Update issue templates
2019-03-31 17:01:57 -04:00
Russ White
7811f2f6ae
Merge pull request #4052 from opensourcerouting/bgpd-show-stats-vpn
bgpd: fix "show bgp statistics" for the VPN safi
2019-03-31 17:01:06 -04:00
Renato Westphal
9c14ec7217 bgpd: fix "show bgp statistics" for the VPN safi
In order to iterate over MPLS VPN routes, it's necessary to use
two nested loops (the outer loop iterates over the MPLS VPN RDs,
and the inner loop iterates over the VPN routes from that RD).

The bgp_table_stats_walker() function wasn't giving this special
treatment to the MPLS VPN safi as it should, which was leading to
crashes and malfunctioning. Fix this.

Signed-off-by: Renato Westphal <renatowestphal@gmail.com>
2019-03-30 01:09:23 -03:00
Renato Westphal
b1ec871ab1 bgpd: remove unused variable
pinum (renamed from rinum) was never used for anything useful since
the initial revision ~17 years ago. Get rid of it.

Signed-off-by: Renato Westphal <renatowestphal@gmail.com>
2019-03-30 01:09:23 -03:00
Renato Westphal
84cffea04f
Merge pull request #4042 from donaldsharp/bfd_sa
bfdd: Clean up assignment without being used SA issue
2019-03-30 00:19:24 -03:00
Quentin Young
7d9a2e6d23 doc: remove unneeded build deps
Remove the following:
* gawk
* dejagnu

Add the following for FreeBSD 9 and OpenBSD 6:
* libexecinfo

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-03-29 18:56:20 +00:00
Rafael Zalamena
e5f988b544
Merge pull request #4041 from donaldsharp/interface_deletion
bfdd, nhrpd, pimd: When deleting an interface clean up
2019-03-29 15:12:45 -03:00
Quentin Young
c1cd1a6e74 .github: move pr template to subdir
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-03-29 16:51:58 +00:00
Quentin Young
56fc78833f .github: remove old issue template
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-03-29 16:50:16 +00:00
Quentin Young
2ccd53c051 .github: Update issue templates
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-03-29 16:50:07 +00:00