]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #3776 from opensourcerouting/pbrd-interface-nexthops
Donald Sharp [Fri, 22 Mar 2019 07:45:48 +0000 (03:45 -0400)]
Merge pull request #3776 from opensourcerouting/pbrd-interface-nexthops

pbrd: add support for interface nexthops

5 years agoMerge pull request #3972 from mjstapp/fix_privs_race
Donald Sharp [Fri, 22 Mar 2019 06:32:17 +0000 (02:32 -0400)]
Merge pull request #3972 from mjstapp/fix_privs_race

libs: fix race in privs changes

5 years agoMerge pull request #3980 from rubensfig/doc_bgp_rr
Donald Sharp [Fri, 22 Mar 2019 06:23:52 +0000 (02:23 -0400)]
Merge pull request #3980 from rubensfig/doc_bgp_rr

doc: route reflector documentation

5 years agoMerge pull request #3992 from rubenk/tools-fix-typos
Quentin Young [Thu, 21 Mar 2019 17:11:55 +0000 (13:11 -0400)]
Merge pull request #3992 from rubenk/tools-fix-typos

tools: fix two typos in daemons file

5 years agotools: fix two typos in daemons file
Ruben Kerkhof [Thu, 21 Mar 2019 13:50:53 +0000 (14:50 +0100)]
tools: fix two typos in daemons file

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
5 years agodoc: route reflector documentation
Rubens Figueiredo [Wed, 20 Mar 2019 13:24:25 +0000 (14:24 +0100)]
doc: route reflector documentation

Signed-off-by: Rubens Figueiredo <rubens@bisdn.de>
5 years agoMerge pull request #3967 from chiragshah6/evpn_dev
Sri Mohana Singamsetty [Thu, 21 Mar 2019 03:42:48 +0000 (20:42 -0700)]
Merge pull request #3967 from chiragshah6/evpn_dev

bgpd: evpn l3vni add router mac self check skip route installation

5 years agoMerge pull request #3863 from patrasar/RP_addition_deletion_changes
Donald Sharp [Wed, 20 Mar 2019 22:31:01 +0000 (18:31 -0400)]
Merge pull request #3863 from patrasar/RP_addition_deletion_changes

Rp addition deletion changes

5 years agoRevert "Merge pull request #3982 from pacovn/Coverity_1479148_copy_paste"
Quentin Young [Wed, 20 Mar 2019 21:25:04 +0000 (21:25 +0000)]
Revert "Merge pull request #3982 from pacovn/Coverity_1479148_copy_paste"

This reverts commit 3a3704fe365a25b9644a938f674effb3e6084c56, reversing
changes made to 5a3c6e736dca3639a1b49cdf305b909736f721de.

5 years agoMerge pull request #3982 from pacovn/Coverity_1479148_copy_paste
Quentin Young [Wed, 20 Mar 2019 21:09:49 +0000 (17:09 -0400)]
Merge pull request #3982 from pacovn/Coverity_1479148_copy_paste

zebra: copy-paste error (Coverity 1479148)

5 years agoMerge pull request #3968 from donaldsharp/bfd_valuable_valgrind
Rafael Zalamena [Wed, 20 Mar 2019 16:01:43 +0000 (13:01 -0300)]
Merge pull request #3968 from donaldsharp/bfd_valuable_valgrind

bfdd: Prevent uninited use of data

5 years agozebra: copy-paste error (Coverity 1479148)
F. Aragon [Wed, 20 Mar 2019 15:45:32 +0000 (16:45 +0100)]
zebra: copy-paste error (Coverity 1479148)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobfdd: Prevent uninited use of data
Donald Sharp [Sun, 17 Mar 2019 01:25:59 +0000 (21:25 -0400)]
bfdd: Prevent uninited use of data

Running valgrind w/ bfdd and shut/no shuting interfaces
can result in this valgrind issue:

==20279== Conditional jump or move depends on uninitialised value(s)
==20279==    at 0x115848: bfdd_sessions_enable_address (ptm_adapter.c:644)
==20279==    by 0x115848: bfdd_interface_address_update (ptm_adapter.c:674)
==20279==    by 0x48D8CAB: zclient_read (zclient.c:2698)
==20279==    by 0x48CCEE3: thread_call (thread.c:1603)
==20279==    by 0x48A84EF: frr_run (libfrr.c:1011)
==20279==    by 0x10DAC3: main (bfdd.c:236)
==20279==

When creating the bso data structure set the bso_isaddress to false
as a default value.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3977 from opensourcerouting/bfd-small-fixes
Quentin Young [Wed, 20 Mar 2019 05:01:08 +0000 (01:01 -0400)]
Merge pull request #3977 from opensourcerouting/bfd-small-fixes

bfdd: two small fixes

5 years agoMerge pull request #3976 from qlyoung/test-update-docker-repo
Rafael Zalamena [Tue, 19 Mar 2019 21:28:42 +0000 (18:28 -0300)]
Merge pull request #3976 from qlyoung/test-update-docker-repo

tests: point topotests docker img to new location

5 years agobgpd: router mac same as self skip route install
Chirag Shah [Wed, 13 Mar 2019 01:41:01 +0000 (18:41 -0700)]
bgpd: router mac same as self skip route install

When a bgp-peer comes up prior to l3vnis are up in bgpd.
The EVPN routes (type-2/type-5) are learnt via peer.
The routes can have one of interface's MAC in rmac attribute.
The self rmac check would bypass as l3vni is not present.

Once l3vni has come up in bgpd, while installing evpn
routes in vrf table, perform rmac attribute check against self mac.
The routes with rmac of ours will be removed via re-scan
of routes during bgp_mac_rescan_all_evpn_tables when
interface mac is added to bgp.

Ticket:CM-24224
Reviewed By:CCR-8423
Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulunetworks.com>
5 years agobfdd: fix echo loopback function
Rafael Zalamena [Tue, 19 Mar 2019 20:25:00 +0000 (17:25 -0300)]
bfdd: fix echo loopback function

Add the address family to the sockaddr structure otherwise `sendmsg`
will fail with `EAFNOSUPPORT`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: fix JSON API local-address translation
Rafael Zalamena [Tue, 19 Mar 2019 20:22:58 +0000 (17:22 -0300)]
bfdd: fix JSON API local-address translation

Get the local-address from the right key struct member.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agotests: point topotests docker img to new location
Quentin Young [Tue, 19 Mar 2019 20:18:49 +0000 (20:18 +0000)]
tests: point topotests docker img to new location

The topotests docker image has moved from frrouting/frr to
frrouting/topotests. Update accordingly.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #3975 from mjstapp/fix_ospf_empty_debug
Quentin Young [Tue, 19 Mar 2019 16:42:29 +0000 (12:42 -0400)]
Merge pull request #3975 from mjstapp/fix_ospf_empty_debug

ospfd: remove empty debug

5 years agoMerge pull request #3960 from donaldsharp/connected
Mark Stapp [Tue, 19 Mar 2019 15:33:55 +0000 (11:33 -0400)]
Merge pull request #3960 from donaldsharp/connected

zebra: System routes sometimes can not be properly selected

5 years agoospfd: remove empty debug
Mark Stapp [Tue, 19 Mar 2019 14:47:00 +0000 (10:47 -0400)]
ospfd: remove empty debug

Remove empty debug line - empty format string generates a
compile warning.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #3950 from donaldsharp/zlookup_or_down
Jafar Al-Gharaibeh [Tue, 19 Mar 2019 05:10:10 +0000 (00:10 -0500)]
Merge pull request #3950 from donaldsharp/zlookup_or_down

pimd: Free up zlookup structure late

5 years agopimd: Addressing the review comments
Sarita Patra [Tue, 19 Mar 2019 03:22:04 +0000 (20:22 -0700)]
pimd: Addressing the review comments

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agoMerge pull request #3947 from dslicenc/bgpd-redist-connected-vrf
Lou Berger [Sun, 17 Mar 2019 18:26:44 +0000 (14:26 -0400)]
Merge pull request #3947 from dslicenc/bgpd-redist-connected-vrf

Bgpd redist connected vrf

5 years agoMerge pull request #3963 from AnuradhaKaruppiah/dad-fixes
Sri Mohana Singamsetty [Sun, 17 Mar 2019 17:41:20 +0000 (10:41 -0700)]
Merge pull request #3963 from AnuradhaKaruppiah/dad-fixes

zebra: EVPN DAD trigger was causing zebra to crash

5 years agolibs: fix race in privs changes
Mark Stapp [Sun, 17 Mar 2019 17:25:16 +0000 (13:25 -0400)]
libs: fix race in privs changes

Use the privs struct mutex more strictly, to ensure that the
privs are at the level the caller expects when the apis
return.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #3949 from qlyoung/remove-zlog-newlines
Sri Mohana Singamsetty [Fri, 15 Mar 2019 17:27:54 +0000 (10:27 -0700)]
Merge pull request #3949 from qlyoung/remove-zlog-newlines

*: remove trailing newlines from zlog messages

5 years agoMerge pull request #3892 from vivek-cumulus/evpn_vrf_route_leak
Sri Mohana Singamsetty [Fri, 15 Mar 2019 17:27:13 +0000 (10:27 -0700)]
Merge pull request #3892 from vivek-cumulus/evpn_vrf_route_leak

Leaking of EVPN-based IPv4 and IPv6 routes between VRFs

5 years agoMerge pull request #3962 from donaldsharp/pim_display
Mark Stapp [Fri, 15 Mar 2019 17:10:54 +0000 (13:10 -0400)]
Merge pull request #3962 from donaldsharp/pim_display

pimd: Display drpriority as a unsigned int

5 years agozebra: EVPN DAD trigger was causing zebra to crash
Anuradha Karuppiah [Fri, 15 Mar 2019 16:13:42 +0000 (09:13 -0700)]
zebra: EVPN DAD trigger was causing zebra to crash

Duplicate address detection and recovery was relying on the l2-vni backptr
in the neighbor entry which was simply not initialized resulting in
a NULL pointer access in a setup with dup-addressed VMs -
VM1:{IP1,M1} and VM2:{IP1,M2}

Call stack:
(gdb) bt 6
    at lib/sigevent.c:249
    nbr=nbr@entry=0x559347f901d0, vtep_ip=..., vtep_ip@entry=..., do_dad=do_dad@entry=true,
    is_dup_detect=is_dup_detect@entry=0x7ffc7f6be59f, is_local=is_local@entry=true)
    at ./lib/ipaddr.h:86
    ip=0x7ffc7f6be6f0, ifp=0x559347f901d0, zvni=0x559347f86800) at zebra/zebra_vxlan.c:3152
(More stack frames follow...)
(gdb) p nbr->zvni
$8 = (zebra_vni_t *) 0x0 <<<<<<<<<<<<<<<<<<<<
(gdb)

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
5 years agopimd: Display drpriority as a unsigned int
Donald Sharp [Fri, 15 Mar 2019 15:32:41 +0000 (11:32 -0400)]
pimd: Display drpriority as a unsigned int

There existed output code that used %d for a uint32_t
switch to a %u.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: System routes sometimes can not be properly selected
Donald Sharp [Mon, 11 Mar 2019 13:39:19 +0000 (09:39 -0400)]
zebra: System routes sometimes can not be properly selected

System Routes if received over the netlink bus in a
specific pattern that causes an update operation for that
route in zebra can leave the dest->selected_fib pointer NULL,
while having the ZEBRA_FLAG_SELECTED flag set. Specifically
one way to achieve this is to do this:

`ip addr del 4.5.6.7/32 dev swp1 ; ip addr add 4.5.6.7/32 dev swp1 metric 9`

Why is this a big deal?
Because nexthop tracking is looking at ZEBRA_FLAG_SELECTED to
know if we can use a route, while nexthop active checking uses
dest->selected_fib.

So imagine we have bgp registering a nexthop. nexthop tracking in
the above case will be able to choose the 4.5.6.7/32 route
if that is what the nexthop is, due to the ZEBRA_FLAG_SELECTED being
properly set. BGP then allows the peers connection to come up and we
install routes with a 4.5.6.7 nexthop. The rib processing for route
installation will then look at the 4.5.6.7 route see no
dest->selected_fib and then start walking up the tree to resolve
the route. In our case we could easily hit the default route and be
unable to resolve the route. Which then becomes inactive in the
rib so we never attempt to install it.

This commit fixes this problem because when the rib_process decides
that we need to update the fib( ie replace old w/ new ), the
replacement with new was not setting the `dest->selected_fib` pointer
to the new route_entry, when the route was a system route.

Ticket: CM-24203
Signed-off-by: Donald Sharp <sharpd@cumulusnetworkscom>
5 years agoMerge pull request #3920 from AkhileshSamineni/show_bgp_ipv6_summary_fix_master
Donald Sharp [Fri, 15 Mar 2019 12:54:03 +0000 (08:54 -0400)]
Merge pull request #3920 from AkhileshSamineni/show_bgp_ipv6_summary_fix_master

bgpd: Incorrect number of peers count in "show bgp ipv6 summary" output

5 years agoMerge pull request #3900 from opensourcerouting/ripd-fix-no-passive-iface
Donald Sharp [Fri, 15 Mar 2019 12:37:44 +0000 (08:37 -0400)]
Merge pull request #3900 from opensourcerouting/ripd-fix-no-passive-iface

ripd: fix removal of configured passive interfaces

5 years agoMerge pull request #3902 from opensourcerouting/fix-removal-np-containers
Donald Sharp [Fri, 15 Mar 2019 12:37:12 +0000 (08:37 -0400)]
Merge pull request #3902 from opensourcerouting/fix-removal-np-containers

lib: fix removal of yang non-presence containers

5 years agoMerge pull request #3943 from mjstapp/fix_ospf_json_fix
Donald Sharp [Fri, 15 Mar 2019 12:34:31 +0000 (08:34 -0400)]
Merge pull request #3943 from mjstapp/fix_ospf_json_fix

ospfd: fix some json timer output

5 years agopimd: Free up zlookup structure late
Donald Sharp [Thu, 14 Mar 2019 21:03:26 +0000 (17:03 -0400)]
pimd: Free up zlookup structure late

When we are shutting down, delay the zlookup free to as
late as possible since we may need it still

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years ago*: remove trailing newlines from zlog messages
Quentin Young [Thu, 14 Mar 2019 18:41:15 +0000 (18:41 +0000)]
*: remove trailing newlines from zlog messages

Zlog puts its own newlines on, and doing this makes logs look nasty.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd: fix redistribution into vrf when networking is restarted
Don Slice [Thu, 14 Mar 2019 15:17:47 +0000 (15:17 +0000)]
bgpd: fix redistribution into vrf when networking is restarted

Found that previous fix for this issue caused collatoral damage and
reverted that fix.  This fix clears the vrf_bitmaps when the vrf is
disabled/deleted and then re-applies the redist config when the vrf
is re-enabled.

Ticket: CM-24231
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agobgpd: move bgp_update_redist_vrf_bitmaps to bgp_zebra.c for wider use beyond bgp_vty
Don Slice [Wed, 13 Mar 2019 18:41:29 +0000 (18:41 +0000)]
bgpd: move bgp_update_redist_vrf_bitmaps to bgp_zebra.c for wider use beyond bgp_vty

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoRevert "bgpd: fix updating redist bitmask when vrf_id changes"
Don Slice [Wed, 13 Mar 2019 17:41:40 +0000 (17:41 +0000)]
Revert "bgpd: fix updating redist bitmask when vrf_id changes"

This reverts commit 48c74f88259c8f706035d6fc80765f4a6f6594f7.

5 years agoospfd: fix some json timer output
Mark Stapp [Wed, 13 Mar 2019 19:25:46 +0000 (15:25 -0400)]
ospfd: fix some json timer output

Fix a few json output values: a few are in seconds, not msecs,
and one is a number-per-second, not a duration.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #3936 from donaldsharp/ospf_1000_club
David Lamparter [Wed, 13 Mar 2019 09:38:37 +0000 (10:38 +0100)]
Merge pull request #3936 from donaldsharp/ospf_1000_club

ospfd: When converting to ms divide by 1000

5 years agoospfd: When converting to ms divide by 1000
Donald Sharp [Wed, 13 Mar 2019 00:44:31 +0000 (20:44 -0400)]
ospfd: When converting to ms divide by 1000

When converting to miliseconds divide by 1000 not
the other way around.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3918 from opensourcerouting/bfd-bug-fixes
Donald Sharp [Tue, 12 Mar 2019 23:08:17 +0000 (19:08 -0400)]
Merge pull request #3918 from opensourcerouting/bfd-bug-fixes

bfdd: bug fixes

5 years agoMerge pull request #3893 from mjstapp/dplane_pw_nexthops
Donald Sharp [Tue, 12 Mar 2019 16:44:42 +0000 (12:44 -0400)]
Merge pull request #3893 from mjstapp/dplane_pw_nexthops

zebra: include nexthop info when installing pseudowires

5 years agoMerge pull request #3908 from Tuetuopay/fix-unnumbered-no-ip
Donald Sharp [Tue, 12 Mar 2019 15:37:52 +0000 (11:37 -0400)]
Merge pull request #3908 from Tuetuopay/fix-unnumbered-no-ip

zebra: Treat ifaces withouth IPv4 as unnumbered

5 years agotopotests: add new bfd topology with IPv6
Rafael Zalamena [Thu, 7 Mar 2019 19:44:08 +0000 (16:44 -0300)]
topotests: add new bfd topology with IPv6

New BFD topology using IPv6 and multi hop peer to cover more daemon
features. This topology also tests BFD integration with BGP, OSPF and
OSPF6.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: don't enable sessions without local-address
Rafael Zalamena [Tue, 12 Mar 2019 00:26:13 +0000 (21:26 -0300)]
bfdd: don't enable sessions without local-address

When the local-address configured by the peer doesn't exist, then we
must observe the session until the mentioned address comes up.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: change session lookup data structure
Rafael Zalamena [Mon, 11 Mar 2019 18:09:15 +0000 (15:09 -0300)]
bfdd: change session lookup data structure

Use simplier data structure key to avoid having to do complex and
error-prone key building (e.g. avoid expecting caller to know IPv6
scope id, interface index, vrf index etc...).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #3909 from AnuradhaKaruppiah/l3-vni-0
Sri Mohana Singamsetty [Mon, 11 Mar 2019 19:05:30 +0000 (12:05 -0700)]
Merge pull request #3909 from AnuradhaKaruppiah/l3-vni-0

bgpd: prevent type-5 route creation if bgp_vrf->l3_vni is 0

5 years agoMerge pull request #3928 from donaldsharp/selected_fib
David Lamparter [Mon, 11 Mar 2019 18:49:30 +0000 (19:49 +0100)]
Merge pull request #3928 from donaldsharp/selected_fib

zebra: Allow json output to give a bit more data

5 years agoMerge pull request #3925 from chiragshah6/evpn_dev2
David Lamparter [Mon, 11 Mar 2019 18:48:31 +0000 (19:48 +0100)]
Merge pull request #3925 from chiragshah6/evpn_dev2

bgpd: vrl route-leak show with all vrfs option

5 years agoMerge pull request #3914 from donaldsharp/allow_views_to_not_vrf
David Lamparter [Mon, 11 Mar 2019 18:45:30 +0000 (19:45 +0100)]
Merge pull request #3914 from donaldsharp/allow_views_to_not_vrf

bgpd: Don't prevent views from being able to connect

5 years agoMerge pull request #3915 from donaldsharp/ecmp_up_in_my_business
David Lamparter [Mon, 11 Mar 2019 18:44:53 +0000 (19:44 +0100)]
Merge pull request #3915 from donaldsharp/ecmp_up_in_my_business

Ecmp up in my business

5 years agoMerge pull request #3860 from AkhileshSamineni/show_bgp_af_neigh_fix
David Lamparter [Mon, 11 Mar 2019 18:43:05 +0000 (19:43 +0100)]
Merge pull request #3860 from AkhileshSamineni/show_bgp_af_neigh_fix

bgpd: 'show bgp [ipv4|ipv6] neighbors' displays all address family neighbors

5 years agoMerge pull request #3907 from donaldsharp/pim_election
David Lamparter [Mon, 11 Mar 2019 18:41:10 +0000 (19:41 +0100)]
Merge pull request #3907 from donaldsharp/pim_election

pimd: Ensure DR election happens when both sides change prio

5 years agoMerge pull request #3898 from dslicenc/peer-group-remote-as
David Lamparter [Mon, 11 Mar 2019 18:40:24 +0000 (19:40 +0100)]
Merge pull request #3898 from dslicenc/peer-group-remote-as

bpgd: resolve more neighbor peer-group issues

5 years agozebra: Allow json output to give a bit more data
Donald Sharp [Sun, 10 Mar 2019 01:28:49 +0000 (20:28 -0500)]
zebra: Allow json output to give a bit more data

The dest->selected_fib should be reported in json output
so that we can debug subtle conditions a bit better in the
future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3889 from donaldsharp/rnh_vrf_down_stuff
Mark Stapp [Fri, 8 Mar 2019 19:48:19 +0000 (14:48 -0500)]
Merge pull request #3889 from donaldsharp/rnh_vrf_down_stuff

zebra Rnh vrf down stuff

5 years agoMerge pull request #3926 from donaldsharp/improved_debugs_vxlan
Mark Stapp [Fri, 8 Mar 2019 17:02:52 +0000 (12:02 -0500)]
Merge pull request #3926 from donaldsharp/improved_debugs_vxlan

Improved debugs vxlan in zebra

5 years agozebra: Add some debugs to neighbor entry processing
Donald Sharp [Fri, 8 Mar 2019 15:46:55 +0000 (10:46 -0500)]
zebra: Add some debugs to neighbor entry processing

When we get a neighbor entry in zebra we start processing it.
Let's add some additional debugs to the processing so that when
it bails out and we don't use the data, we know the reason.
This should help in debugging the problems from why bgp does
not appear to have data associated with a neighbor entry
in the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Remove duplicate NUD_PERMANENT check
Donald Sharp [Fri, 8 Mar 2019 15:30:27 +0000 (10:30 -0500)]
zebra: Remove duplicate NUD_PERMANENT check

The check for an entry being NUD_PERMANENT has already been done
there is no need to do it twice.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: vrl route-leak show with all vrfs option
Chirag Shah [Thu, 7 Mar 2019 20:36:47 +0000 (12:36 -0800)]
bgpd: vrl route-leak show with all vrfs option

VRF Route Leak's
show bgp vrf all ipv4 unicast route-leak
is not supported with `all` keyword.

Testing Done:

bl1# show bgp vrf all ipv4 unicast route-leak

Instance default:
This VRF is not importing IPv4 Unicast routes from any other VRF
This VRF is not exporting IPv4 Unicast routes to any other VRF

Instance vrf3:
This VRF is importing IPv4 Unicast routes from the following VRFs:
  vrf1
Import RT(s): 144.1.1.2:10
This VRF is exporting IPv4 Unicast routes to the following VRFs:
  vrf1
RD: 144.1.3.2:9
Export RT: 144.1.3.2:9

Instance vrf1:
This VRF is importing IPv4 Unicast routes from the following VRFs:
  vrf3
Import RT(s): 144.1.3.2:9
This VRF is exporting IPv4 Unicast routes to the following VRFs:
  vrf3
RD: 144.1.1.2:10
Export RT: 144.1.1.2:10

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agozebra: use const in dplane pw nhlfe accessors
Mark Stapp [Thu, 7 Mar 2019 18:09:51 +0000 (13:09 -0500)]
zebra: use const in dplane pw nhlfe accessors

Use const in the accessors for pseudowire nhlfe data; pull
that through the kernel-facing apis that use that data.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: dplane pseudowires including nexthop info
Mark Stapp [Fri, 1 Mar 2019 18:33:17 +0000 (13:33 -0500)]
zebra: dplane pseudowires including nexthop info

Add nexthop info to the data that the zebra dataplane captures
when programming pseudowires.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: rename pseudowire destination api
Mark Stapp [Thu, 28 Feb 2019 21:23:21 +0000 (16:23 -0500)]
zebra: rename pseudowire destination api

In prep for adding nexthop info for pws, rename the accessor
for the pw destination. Add a nexthop-group to the pw
data in the dataplane module.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #3919 from sworleys/Remove-SNL-Var
Mark Stapp [Thu, 7 Mar 2019 13:06:14 +0000 (08:06 -0500)]
Merge pull request #3919 from sworleys/Remove-SNL-Var

zebra: Remove unused sockaddr variable

5 years agozebra: Treat ifaces withouth IPv4 as unnumbered
Tuetuopay [Tue, 5 Mar 2019 18:19:28 +0000 (19:19 +0100)]
zebra: Treat ifaces withouth IPv4 as unnumbered

The current definition of an unnumberd interface as an interface with a
/32 IPv4 is too restrictive, especially for EVPN symmetric routing since
commit 2b83602b2 "*: Explicitly mark nexthop of EVPN-sourced routes as
onlink".

It removes the bypass check wether the nexthop is an EVPN VTEP, and
relies on the SVI to be unnumberd to bypass the gateway lookup. While
this works great if the SVI has an IP, it might not, and the test falls
flat and EVPN type 5 routes are not installed into the RIB.

Sample interface setup, where vxlan-blue is the L3VNI and br-blue the
SVI:

              +----------+
              |          |
              | vrf-blue |
              |          |
              +---+--+---+
                  |  |
          +-------+  +-----------+
          |                      |
     +----+----+       +---------+---------+
     |         |       |        br1        |
     | br-blue |       |    10.0.0.1/24    |
     |         |       +-+-------+-------+-+
     +----+----+         |       |       |
          |              |       |       |
    +-----+------+ +-----+--+ +--+---+ +-+----+
    |            | |        | |      | |      |
    | vxlan-blue | | vxlan1 | | eth1 | | eth2 |
    |            | |        | |      | |      |
    +------------+ +--------+ +------+ +------+

For inter-VNI routing, the SVI has no reason to have an IP, but it still
needs type-5 routes from remote VTEPs.

This commit expands the definition of an unnumberd interface to an
interface having a /32 IPv4 or no IPv4 at all.

Signed-off-by: Tuetuopay <tuetuopay@me.com>
5 years agobgpd: Incorrect number of peers count in "show bgp ipv6 summary output
Akhilesh Samineni [Thu, 7 Mar 2019 07:47:25 +0000 (13:17 +0530)]
bgpd: Incorrect number of peers count in "show bgp ipv6 summary output

The "show bgp ipv6 summary" output displays incorrect number of peers count.

sonic# show bgp ipv6 summary

IPv6 Unicast Summary:
BGP router identifier 10.1.0.1, local AS number 65100 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 5, using 103 KiB of memory
Peer groups 1, using 64 bytes of memory

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2003::1 4 65099 0 0 0 0 0 never Active
2088::1 4 65100 0 0 0 0 0 never Active
3021::2 4 65100 0 0 0 0 0 never Active

Total number of neighbors 3
sonic#
In the above output, the peers count displays as 5 but the actual peer count is 3, i.e.. 3 neighbors are activated in ipv6 unicast address family.
Displayed peer count (5) is the number of the neighbors activated in a BGP instance.

Fix : Now the peers count displays the number of neighbors activated per afi/safi.
After Fix:
sonic# show bgp ipv6 summary

IPv6 Unicast Summary:
BGP router identifier 10.1.0.1, local AS number 65100 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 3, using 62 KiB of memory
Peer groups 1, using 64 bytes of memory

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2003::1 4 65099 0 0 0 0 0 never Active
2088::1 4 65100 0 0 0 0 0 never Active
3021::2 4 65100 0 0 0 0 0 never Active

Total number of neighbors 3
sonic#

Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
5 years agobfdd: fix single hop IPv6 configurations
Rafael Zalamena [Wed, 6 Mar 2019 20:50:04 +0000 (17:50 -0300)]
bfdd: fix single hop IPv6 configurations

Don't assume IPv6 will always be multi hop and handle the single hop
link-local address case.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobgpd: Don't prevent views from being able to connect
Donald Sharp [Wed, 6 Mar 2019 15:40:53 +0000 (10:40 -0500)]
bgpd: Don't prevent views from being able to connect

Views are perfectly valid and should be allowed to connect.
In a bgp instance scenario the vrf_id will always be UNKNOWN,
so allow it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Remove unused sockaddr variable
Stephen Worley [Wed, 6 Mar 2019 15:53:49 +0000 (10:53 -0500)]
zebra: Remove unused sockaddr variable

This variable does nothing, removing it.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agodoc: Update documentation about multipath
Donald Sharp [Wed, 6 Mar 2019 15:47:21 +0000 (10:47 -0500)]
doc: Update documentation about multipath

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoconfigure: Default to 16 way ecmp on compilation
Donald Sharp [Wed, 6 Mar 2019 15:44:34 +0000 (10:44 -0500)]
configure: Default to 16 way ecmp on compilation

If a person who is compiling FRR does not specify the
multipath number on configure we are defaulting to a ecmp of 1.
Let's change this to 16.  In this day and age most everything
supports actual ecmp.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3855 from donaldsharp/bgp_clist_sa
David Lamparter [Wed, 6 Mar 2019 15:02:01 +0000 (16:02 +0100)]
Merge pull request #3855 from donaldsharp/bgp_clist_sa

bgpd: Cleanup cli for [l]community_delete functions

5 years agoMerge pull request #3853 from donaldsharp/partial_revert
David Lamparter [Wed, 6 Mar 2019 15:00:40 +0000 (16:00 +0100)]
Merge pull request #3853 from donaldsharp/partial_revert

zebra: Prevent crash in dad auto recovery

5 years agoMerge pull request #3911 from mjstapp/fix_privs_deadlock
David Lamparter [Wed, 6 Mar 2019 14:58:20 +0000 (15:58 +0100)]
Merge pull request #3911 from mjstapp/fix_privs_deadlock

libs: make privilege elevation thread-safe

5 years agoMerge pull request #3869 from qlyoung/cocci-fixes
David Lamparter [Wed, 6 Mar 2019 14:54:44 +0000 (15:54 +0100)]
Merge pull request #3869 from qlyoung/cocci-fixes

Assorted Coccinelle fixes

5 years agoRevert "nhrpd: strncpy -> strlcpy"
Quentin Young [Tue, 5 Mar 2019 19:29:49 +0000 (19:29 +0000)]
Revert "nhrpd: strncpy -> strlcpy"

This reverts commit eb266ecb847b70bcf9901da5ed59a39d3e07fd8f.

5 years agobgpd: prevent type-5 route creation if bgp_vrf->l3_vni is 0
Anuradha Karuppiah [Tue, 5 Mar 2019 18:40:26 +0000 (10:40 -0800)]
bgpd: prevent type-5 route creation if bgp_vrf->l3_vni is 0

After a router reboot the L3 network via it converges before the L2
network. This is because MLAG intentionally holds down bridge-access
and vxlan-network ports for some time (MLAG init-delay) to prevent traffic
from switching to a router that is not fully ready. This also means that
routes (from vrf-peering sessions) that qualify for evpn type-5
advertisments are available long before the L3-VNI is available for that
tenant VRF. In these windows bgpd was adding these evpn-type-5 routes with
a L3-VNI of 0 (which was not fixed up after the L3-VNI became available) -

BGP routing table entry for 100.0.0.1:2:[5]:[0]:[0]:[32]:[200.1.1.1]
Paths: (1 available, best #1)
  Advertised to non peer-group peers:
  MSP1(uplink-1) MSP2(uplink-2)
  Route [5]:[0]:[0]:[32]:[200.1.1.1] VNI 0 >>>>>>>>
  65001 65535
    36.0.0.9 from 0.0.0.0 (27.0.0.9)
      Origin incomplete, metric 0, valid, sourced, local, bestpath-from-AS 65001, best
      Extended Community: ET:8 RT:5544:4001 Rmac:44:38:39:ff:ff:01
      AddPath ID: RX 0, TX 327
      Last update: Wed Feb 27 18:37:10 2019

Fix is to defer creating type-5 routes till the L3-VNI is available for
that tenant VRF (this was already being done for most cases; fixup takes
care of some that missed the check).

Ticket: CM-24022

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
5 years agolibs: make privilege escalation thread-safe
Mark Stapp [Tue, 5 Mar 2019 20:28:26 +0000 (15:28 -0500)]
libs: make privilege escalation thread-safe

Privs escalation is process-wide, and a multi-threaded process
can deadlock. This adds a mutex and a counter to the privs
object, preventing multiple threads from making the privs
escalation system call.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agopimd: Ensure DR election happens when both sides change prio
Donald Sharp [Tue, 5 Mar 2019 15:29:35 +0000 (10:29 -0500)]
pimd: Ensure DR election happens when both sides change prio

Suppose we have 2 routers A and B.  Both Router A and B have
the same priority of 1000.  Router A is the elected DR.
Now suppose B lowers his priority to 1.  He still looses the
DR election and we are not sending a hello with the new priority.
Immediately after this A's priority is also lowered to 1, it
looses the election and sends the hello.  B receives this hello
and elects A as the DR( since it has the better ip address)
At this point A believes B is the DR, and B believes A is the
DR until such time that the normal hello from B is sent to A,
which if timed correctly can be a significant amount of time).

This code just causes a hello to be sent if the priority is
changed.  Now both sides will be able to converge quickly

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3848 from chiragshah6/evpn_dev2
Sri Mohana Singamsetty [Tue, 5 Mar 2019 04:45:44 +0000 (20:45 -0800)]
Merge pull request #3848 from chiragshah6/evpn_dev2

bgpd: evpn reject bgp update to overwrite self mac as part of router-mac ext. community

5 years agoMerge pull request #3879 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Mon, 4 Mar 2019 21:18:31 +0000 (13:18 -0800)]
Merge pull request #3879 from chiragshah6/evpn_dev1

bgpd: fix evpn type-5 implicit withdraw processing

5 years agobgpd: router mac same as self supress bgp update
Chirag Shah [Thu, 28 Feb 2019 00:36:47 +0000 (16:36 -0800)]
bgpd: router mac same as self supress bgp update

bgp update can contain router mac address same as one of SVIs
mac address, during processing of evpn route in bpg_update()
check for the flag is set and filter the route from installing.
This check is done prior to attribute lookup or storing in database.

Parse check and set is done once during attribute parse
because all the NLRIs containing evpn prefix
(type-2/type-5) will have same exntended community applicable.

Ticket:CM-23674
Reviewed By:CCR-8336
Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobgpd: parse and comapre rmac attr against self mac
Chirag Shah [Wed, 20 Feb 2019 00:02:00 +0000 (16:02 -0800)]
bgpd: parse and comapre rmac attr against self mac

Any evpn bgp update message comes with router mac extended
community, which can potentially contain the madd adddress
same as any of the local SVIs (L3VNI) MAC address.
Set route mac exist and during route processing in
bgp_update() filter the route.

Ticket:CM-23674
Reviewed By:CCR-8336
Testing Done:
Configure L3vni mac on TORS1 which is similar to TORC11
L3vni MAC. When TORC11 received the EVPN update with
Router mac extended community, this check rejected the
BGP update message.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agolib: fix removal of yang non-presence containers
Renato Westphal [Thu, 28 Feb 2019 22:54:47 +0000 (19:54 -0300)]
lib: fix removal of yang non-presence containers

Non-presence containers don't have "destroy" callbacks. So, once
a np-container is deleted, we need to call the "destroy" callbacks
of its child nodes instead.

This commit doesn't fix any real problem as of now since all
np-containers from the FRR YANG modules contain or one more mandatory
child nodes, so they can't be deleted (libyang will add missing
np-containers when validating data). Nevertheless, upcoming YANG
modules should benefit from this change.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: simplify code that calculates configuration diffs
Renato Westphal [Thu, 28 Feb 2019 22:49:28 +0000 (19:49 -0300)]
lib: simplify code that calculates configuration diffs

This is just a small refactoring to reduce code duplication. No
behavior changes intended.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoripd: fix removal of configured passive interfaces
Renato Westphal [Sat, 2 Mar 2019 20:45:14 +0000 (17:45 -0300)]
ripd: fix removal of configured passive interfaces

libyang-0.16-rc3 fixed a bug [1] in which data would be auto-deleted
when it shouldn't. The problem is that the "no passive-interface"
command was relying on that wrong behavior, so the command was
affected when the libyang bug was fixed. Adapt the command to do
the right thing in order to get rid of the problem (regardless of
the libyang version being used).

"passive-interface default" still has problems though, but that
will be addressed separetely in the future.

Fixes #3870.

[1] https://github.com/CESNET/libyang/commit/8af82206908

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobpgd: resolve more neighbor peer-group issues
Don Slice [Sat, 2 Mar 2019 19:40:17 +0000 (19:40 +0000)]
bpgd: resolve more neighbor peer-group issues

Found in testing that in a certain sequence, a neighbor's peer-group
membership would be lost.  This fix resolves that issue. Additionally
found that "no neighbor swp1 remote-as 2" would sometimes leave the
config with "neighbor swp1 remote-as 0" rather than removing from the
config. That one is also resolved.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agozebra: Upon vrf deletion, actually release this data.
Donald Sharp [Thu, 28 Feb 2019 14:11:41 +0000 (09:11 -0500)]
zebra: Upon vrf deletion, actually release this data.

When a vrf is deleted we need to tell the zebra_router that we have
finished using the tables we are keeping track of.  This will allow
us to properly cleanup the data structures associated with them.

This fixes this valgrind error found:

==8579== Invalid read of size 8
==8579==    at 0x430034: zvrf_id (zebra_vrf.h:167)
==8579==    by 0x432366: rib_process (zebra_rib.c:1580)
==8579==    by 0x432366: process_subq (zebra_rib.c:2092)
==8579==    by 0x432366: meta_queue_process (zebra_rib.c:2188)
==8579==    by 0x48C99FE: work_queue_run (workqueue.c:291)
==8579==    by 0x48C3788: thread_call (thread.c:1607)
==8579==    by 0x48A2E9E: frr_run (libfrr.c:1011)
==8579==    by 0x41316A: main (main.c:473)
==8579==  Address 0x5aeb750 is 0 bytes inside a block of size 4,424 free'd
==8579==    at 0x4839A0C: free (vg_replace_malloc.c:540)
==8579==    by 0x438914: zebra_vrf_delete (zebra_vrf.c:279)
==8579==    by 0x48C4225: vrf_delete (vrf.c:243)
==8579==    by 0x48C4225: vrf_delete (vrf.c:217)
==8579==    by 0x4151CE: netlink_vrf_change (if_netlink.c:364)
==8579==    by 0x416810: netlink_link_change (if_netlink.c:1189)
==8579==    by 0x41C1FC: netlink_parse_info (kernel_netlink.c:904)
==8579==    by 0x41C2D3: kernel_read (kernel_netlink.c:389)
==8579==    by 0x48C3788: thread_call (thread.c:1607)
==8579==    by 0x48A2E9E: frr_run (libfrr.c:1011)
==8579==    by 0x41316A: main (main.c:473)
==8579==  Block was alloc'd at
==8579==    at 0x483AB1A: calloc (vg_replace_malloc.c:762)
==8579==    by 0x48A6030: qcalloc (memory.c:110)
==8579==    by 0x4389EF: zebra_vrf_alloc (zebra_vrf.c:382)
==8579==    by 0x438A42: zebra_vrf_new (zebra_vrf.c:93)
==8579==    by 0x48C40AD: vrf_get (vrf.c:209)
==8579==    by 0x415144: netlink_vrf_change (if_netlink.c:319)
==8579==    by 0x415E90: netlink_interface (if_netlink.c:653)
==8579==    by 0x41C1FC: netlink_parse_info (kernel_netlink.c:904)
==8579==    by 0x4163E8: interface_lookup_netlink (if_netlink.c:760)
==8579==    by 0x42BB37: zebra_ns_enable (zebra_ns.c:130)
==8579==    by 0x42BC5E: zebra_ns_init (zebra_ns.c:208)
==8579==    by 0x4130F4: main (main.c:401)

This can be found by: `ip link del <VRF DEVICE NAME>` then `ip link add <NAME> type vrf table X` again and
then attempting to use the vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agosharpd: Add code to allow nexthops to be watched from non-default vrf
Donald Sharp [Thu, 28 Feb 2019 13:24:20 +0000 (08:24 -0500)]
sharpd: Add code to allow nexthops to be watched from non-default vrf

Add a bit of code to the sharp cli to allow it to specify a non-default
vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3894 from donaldsharp/install_replace
Mark Stapp [Fri, 1 Mar 2019 21:19:31 +0000 (16:19 -0500)]
Merge pull request #3894 from donaldsharp/install_replace

zebra: When installing a new route always use REPLACE

5 years agosharpd: Add ability to pass vrf we want to watch
Donald Sharp [Thu, 28 Feb 2019 13:12:32 +0000 (08:12 -0500)]
sharpd: Add ability to pass vrf we want to watch

Add the ability for the sharp zebra code to pass down the
vrf that we want to watch.  At this point in time, we
cannot use it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agosharpd: Add cli to allow vrf route installation
Donald Sharp [Thu, 28 Feb 2019 13:09:53 +0000 (08:09 -0500)]
sharpd: Add cli to allow vrf route installation

Add a bit of code to allow the end user to specify a [vrf NAME]
for route installation/deletion.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agosharpd: Setup route installation to be able to select vrf to use
Donald Sharp [Thu, 28 Feb 2019 12:51:41 +0000 (07:51 -0500)]
sharpd: Setup route installation to be able to select vrf to use

Modify the sharp code to allow for vrf route installation.  At
this point in time the code is nascent.  Future commits will turn
on this behavior.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3877 from qlyoung/remove-strncpy
Renato Westphal [Fri, 1 Mar 2019 20:06:29 +0000 (17:06 -0300)]
Merge pull request #3877 from qlyoung/remove-strncpy

Remove strncpy

5 years agozebra: When installing a new route always use REPLACE
Donald Sharp [Fri, 1 Mar 2019 18:56:12 +0000 (13:56 -0500)]
zebra: When installing a new route always use REPLACE

When we install a new route into the kernel always use
REPLACE.  Else if the route is already there it can
be translated into an append with the flags we are
using.

This is especially true for the way we handle pbr
routes as that we are re-installing the same route
entry from pbr at the moment.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>