]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agoMerge pull request #5771 from pguibert6WIND/show_route_table_protocol
Donald Sharp [Tue, 25 Feb 2020 14:14:56 +0000 (09:14 -0500)]
Merge pull request #5771 from pguibert6WIND/show_route_table_protocol

vty: add command to get route with table, vrf and protocol

4 years agoMerge pull request #5838 from volta-networks/fix_isis_ifdown
Renato Westphal [Fri, 21 Feb 2020 13:41:09 +0000 (10:41 -0300)]
Merge pull request #5838 from volta-networks/fix_isis_ifdown

isisd: do not disable circuit on ifdown

4 years agoMerge pull request #5844 from qlyoung/fix-zebra-gr-unnecessary-malloc
Donatas Abraitis [Fri, 21 Feb 2020 13:03:46 +0000 (15:03 +0200)]
Merge pull request #5844 from qlyoung/fix-zebra-gr-unnecessary-malloc

Fix zebra gr unnecessary malloc

4 years agoMerge pull request #5847 from mjstapp/fix_pim_sas
Quentin Young [Thu, 20 Feb 2020 18:51:07 +0000 (13:51 -0500)]
Merge pull request #5847 from mjstapp/fix_pim_sas

pimd: fix SA reports

4 years agopimd: fix SA reports
Mark Stapp [Thu, 20 Feb 2020 13:41:57 +0000 (08:41 -0500)]
pimd: fix SA reports

Fix a couple of SA warnings introduced recently; replace some
'strcpy' calls.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #5842 from qlyoung/fix-test-then-xfree-again
Donatas Abraitis [Thu, 20 Feb 2020 12:40:02 +0000 (14:40 +0200)]
Merge pull request #5842 from qlyoung/fix-test-then-xfree-again

lib: do not test before XFREE

4 years agoMerge pull request #5845 from TomasKorbar/master
Donald Sharp [Thu, 20 Feb 2020 11:32:02 +0000 (06:32 -0500)]
Merge pull request #5845 from TomasKorbar/master

Make frr able to be built by gcc 10

4 years agoMerge pull request #5768 from donaldsharp/bgp_nexthop
Donatas Abraitis [Thu, 20 Feb 2020 08:05:53 +0000 (10:05 +0200)]
Merge pull request #5768 from donaldsharp/bgp_nexthop

Bgp nexthop

4 years agoMerge pull request #5831 from donaldsharp/small_test_speedups
Donatas Abraitis [Thu, 20 Feb 2020 07:43:26 +0000 (09:43 +0200)]
Merge pull request #5831 from donaldsharp/small_test_speedups

Small test speedups

4 years agopimd: Make frr able to be built by gcc 10
Tomas Korbar [Thu, 20 Feb 2020 06:37:55 +0000 (07:37 +0100)]
pimd: Make frr able to be built by gcc 10

- Add extern modifier to some declarations in header file and move
qpim_all_pim_routers_addr definition to pimd/pimd.c

`GCC now defaults to -fno-common. As a result, global variable accesses
are more efficient on various targets. In C, global variables with
multiple tentative definitions now result in linker errors.`
Taken from https://gcc.gnu.org/gcc-10/changes.html

Signed-off-by: Tomas Korbar <tkorbar@redhat.com>
4 years agoMerge pull request #5840 from opensourcerouting/route-map-recurse
Donald Sharp [Thu, 20 Feb 2020 03:56:25 +0000 (22:56 -0500)]
Merge pull request #5840 from opensourcerouting/route-map-recurse

lib: don't allow to recurse inside route-map node

4 years agozebra: remove null check before XFREE in GR code
Quentin Young [Thu, 20 Feb 2020 02:36:54 +0000 (21:36 -0500)]
zebra: remove null check before XFREE in GR code

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agozebra: reduce scope of XCALLOC for gr processing
Quentin Young [Wed, 19 Feb 2020 21:43:57 +0000 (16:43 -0500)]
zebra: reduce scope of XCALLOC for gr processing

Somewhat gnarly code flow here that might be leaking memory - can't tell
if it's a test artifact or not, but in any case this reduces the
situations in which we need to alloc a block.

And we don't need to check XCALLOC for success...
And we don't need to null check before XFREE...
Or set XFREE'd pointers to NULL...

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agolib: do not test before XFREE
Quentin Young [Wed, 19 Feb 2020 22:06:44 +0000 (17:06 -0500)]
lib: do not test before XFREE

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agolib: don't allow to recurse inside route-map node
Rafael Zalamena [Wed, 19 Feb 2020 20:51:07 +0000 (17:51 -0300)]
lib: don't allow to recurse inside route-map node

vtysh should handle going back up one level to try the command, there is
no need to be able to recurse inside route-map.

This also fixes a problem with northbound hitting the XPath queue limit
of 8 nodes.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotests: Reduce rip[ng]-topo1 run time
Donald Sharp [Wed, 19 Feb 2020 13:06:44 +0000 (08:06 -0500)]
tests: Reduce rip[ng]-topo1 run time

Reduce rip topo1 run time from ~100 seconds down to ~45 seconds.

1) Reduce very very long sleeps
2) Modify rip timers to be more aggressive in sending data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5826 from mjstapp/fix_cli_pfx_doc
Donald Sharp [Wed, 19 Feb 2020 20:08:08 +0000 (15:08 -0500)]
Merge pull request #5826 from mjstapp/fix_cli_pfx_doc

doc: correct ip prefix token mapping table

4 years agotests: bgp_multiview_topo1 was taking too long
Donald Sharp [Wed, 19 Feb 2020 12:56:50 +0000 (07:56 -0500)]
tests: bgp_multiview_topo1 was taking too long

The bgp_multiview_topo1 test had two issues

a) An abbundance of sleeps that are not necessary
b) The convergence time was too short.

The upshoot of this is that the test goes from 72 -> 33 seconds
run time on my machine.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5788 from karamalla0406/large_comm
Donatas Abraitis [Wed, 19 Feb 2020 20:03:59 +0000 (21:03 +0100)]
Merge pull request #5788 from karamalla0406/large_comm

bgpd: support 'show ip bgp large-community" on default vrf

4 years agoMerge pull request #5834 from opensourcerouting/route-map-fix-crash
Donald Sharp [Wed, 19 Feb 2020 20:03:12 +0000 (15:03 -0500)]
Merge pull request #5834 from opensourcerouting/route-map-fix-crash

lib: fix route-map coverity scan issue

4 years agoMerge pull request #5836 from donaldsharp/bgp_collision
Donatas Abraitis [Wed, 19 Feb 2020 19:51:02 +0000 (20:51 +0100)]
Merge pull request #5836 from donaldsharp/bgp_collision

bgpd: Add a better breadcrumb for when bgp is missconfiged

4 years agoMerge pull request #5837 from qlyoung/fix-zapi-pbr-unsupported-ip-family-log-message...
Donatas Abraitis [Wed, 19 Feb 2020 19:41:30 +0000 (20:41 +0100)]
Merge pull request #5837 from qlyoung/fix-zapi-pbr-unsupported-ip-family-log-message-newline

zebra: remove \n in zapi pbr family log msg

4 years agoisisd: do not disable circuit on ifdown
Emanuele Di Pascale [Wed, 19 Feb 2020 16:37:21 +0000 (17:37 +0100)]
isisd: do not disable circuit on ifdown

when zebra detects that an interface is gone, notify the circuit but do
not disable it - the interface is still configured until it isn't.

Without this fix, removing the interface in the kernel and then removing
the circuit from the configuration would cause an assertion in isis_csm.c:78

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agozebra: remove \n in zapi pbr family log msg
Quentin Young [Wed, 19 Feb 2020 16:24:43 +0000 (11:24 -0500)]
zebra: remove \n in zapi pbr family log msg

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: Add a better breadcrumb for when bgp is missconfiged
Donald Sharp [Wed, 19 Feb 2020 15:52:14 +0000 (10:52 -0500)]
bgpd: Add a better breadcrumb for when bgp is missconfiged

Currently During bgp open collision resolution if both
the router-id's are the same, we correctly follow
the RFC and close the connection.  The problem is of course
that there is no notification of the error in configuration
to the end user other than a subtle open debug message.

Explicitly call out the miss-configuration as an error message
as that this miss-config took several hours of debugging to notice.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: correct ip prefix token mapping table
Mark Stapp [Tue, 18 Feb 2020 19:08:21 +0000 (14:08 -0500)]
doc: correct ip prefix token mapping table

Fix the table that shows the mapping between ip network cli
tokens and the data struct that the cli handler will see.
Optional network/subnet types appear as a pointer to an
all-zeroes struct, not a NULL pointer.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #5802 from ton31337/feature/aggregate-address_origin_override
Donald Sharp [Wed, 19 Feb 2020 13:38:31 +0000 (08:38 -0500)]
Merge pull request #5802 from ton31337/feature/aggregate-address_origin_override

bgpd: Allow overriding ORIGIN for aggregate-address

4 years agolib: fix route-map coverity scan issue
Rafael Zalamena [Wed, 19 Feb 2020 13:35:28 +0000 (10:35 -0300)]
lib: fix route-map coverity scan issue

Use better TAILQ free idiom to avoid coverity scan warnings. This fixes
the coverity scan issue 1491240 .

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #5830 from mjstapp/fix_rtadv_stubs
Donald Sharp [Wed, 19 Feb 2020 13:31:57 +0000 (08:31 -0500)]
Merge pull request #5830 from mjstapp/fix_rtadv_stubs

zebra: fix missing rtadv stub functions

4 years agoMerge pull request #5809 from donaldsharp/vrf_name
Donatas Abraitis [Wed, 19 Feb 2020 13:23:32 +0000 (14:23 +0100)]
Merge pull request #5809 from donaldsharp/vrf_name

Print out vrf name as well as id

4 years agoMerge pull request #5795 from donaldsharp/lua_dev_doc
Donatas Abraitis [Wed, 19 Feb 2020 13:23:11 +0000 (14:23 +0100)]
Merge pull request #5795 from donaldsharp/lua_dev_doc

doc: Add some basic how-to for lua and clean up some found issues

4 years agozebra: fix missing rtadv stub functions
Mark Stapp [Tue, 18 Feb 2020 21:49:54 +0000 (16:49 -0500)]
zebra: fix missing rtadv stub functions

Add in a few missing stub route-advert functions; these are
needed to build frr with v6 route adverts disabled.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #5823 from donaldsharp/irdp_what
Mark Stapp [Tue, 18 Feb 2020 19:27:48 +0000 (14:27 -0500)]
Merge pull request #5823 from donaldsharp/irdp_what

Irdp build and log fixes

4 years agoMerge pull request #5651 from AnuradhaKaruppiah/evpn-pim-fixes
Philippe Guibert [Tue, 18 Feb 2020 17:21:16 +0000 (18:21 +0100)]
Merge pull request #5651 from AnuradhaKaruppiah/evpn-pim-fixes

EVPN-PIM: complete anycast (MLAG) VTEP support

4 years agoMerge pull request #5813 from mjstapp/zapi_labels_use_nh
Donald Sharp [Tue, 18 Feb 2020 14:57:22 +0000 (09:57 -0500)]
Merge pull request #5813 from mjstapp/zapi_labels_use_nh

*: encode zapi labels message using nexthops

4 years agozebra: Fix checksum calculation to not include old checksum
Donald Sharp [Tue, 18 Feb 2020 00:43:22 +0000 (19:43 -0500)]
zebra: Fix checksum calculation to not include old checksum

As part of checksum calculation for a received packet we were
comparing the checksum returned from in_cksum.  Typically
when we calculate the checksum the value stored in the checksum
must be all 0's.  Store the received checksum and then set
the checksum to 0 and then compare.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Fix zlog_debug -> flog_err for error situations in IRDP
Donald Sharp [Tue, 18 Feb 2020 00:31:57 +0000 (19:31 -0500)]
zebra: Fix zlog_debug -> flog_err for error situations in IRDP

In several places we would send debug messages for failure situations
that really should be errors.

Signed-off-by: Donald Sharpd <sharpd@cumulusnetworks.com>
4 years agozebra: SO_BROADCAST needs a uint32_t instead of a uint8_t
Donald Sharp [Tue, 18 Feb 2020 00:24:16 +0000 (19:24 -0500)]
zebra: SO_BROADCAST needs a uint32_t instead of a uint8_t

Using SO_BROADCAST, in the linux kernel, requires a uint32_t to be passed
in for all SOL_SOCKET calls.  Modify code to use it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5801 from donaldsharp/bgp_peer_sort
Sri Mohana Singamsetty [Tue, 18 Feb 2020 05:39:37 +0000 (21:39 -0800)]
Merge pull request #5801 from donaldsharp/bgp_peer_sort

Bgp peer sort

4 years agoMerge pull request #5790 from chiragshah6/mdev
Sri Mohana Singamsetty [Tue, 18 Feb 2020 05:39:16 +0000 (21:39 -0800)]
Merge pull request #5790 from chiragshah6/mdev

bgpd: format fields to bgp evpn vni json cmds

4 years agoMerge pull request #5807 from ton31337/fix/do_not_show_failed_if_shutdown
Donald Sharp [Mon, 17 Feb 2020 14:29:28 +0000 (09:29 -0500)]
Merge pull request #5807 from ton31337/fix/do_not_show_failed_if_shutdown

bgpd: Show the real reason why the peer is failed

4 years agoMerge pull request #5815 from donaldsharp/feb_sa_stuff
Jafar Al-Gharaibeh [Mon, 17 Feb 2020 05:41:55 +0000 (23:41 -0600)]
Merge pull request #5815 from donaldsharp/feb_sa_stuff

bgpd: Fix up a couple of new SA issues found

4 years agoMerge pull request #5817 from donaldsharp/more_bgp_rcvd_sent
Jafar Al-Gharaibeh [Mon, 17 Feb 2020 05:40:31 +0000 (23:40 -0600)]
Merge pull request #5817 from donaldsharp/more_bgp_rcvd_sent

bgpd: Add a couple more spaces for output on MsgRcvd and MsgSent

4 years agoMerge pull request #5820 from donaldsharp/pcreposix
Jafar Al-Gharaibeh [Mon, 17 Feb 2020 05:39:03 +0000 (23:39 -0600)]
Merge pull request #5820 from donaldsharp/pcreposix

lib: Fix so that `--enable-pcreposix` actually compiles

4 years agoMerge pull request #5821 from donaldsharp/configure_fixup
Jafar Al-Gharaibeh [Mon, 17 Feb 2020 05:31:53 +0000 (23:31 -0600)]
Merge pull request #5821 from donaldsharp/configure_fixup

Configure fixup

4 years agobgpd: Add a couple more spaces for output on MsgRcvd and MsgSent
Donald Sharp [Sat, 15 Feb 2020 20:38:48 +0000 (15:38 -0500)]
bgpd: Add a couple more spaces for output on MsgRcvd and MsgSent

annie# show bgp ipv4 uni summ
BGP router identifier 192.168.201.136, local AS number 64539 vrf-id 0
BGP table version 22458946
RIB entries 1458006, using 178 MiB of memory
Peers 4, using 68 KiB of memory

Neighbor               V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
45.33.5.119            4          0       0       0        0    0    0    never       Active
65.19.134.122          4      15096 4611832  108292        0    0    0 6d22h55m       800670
107.13.46.23           4          0       0       0        0    0    0    never      Connect
robot(192.168.201.139) 4      64540 11159975 11365599        0    0    0 05w2d05h      Connect

Total number of neighbors 4

On very busy systems The column output for MsgRcvd and MsgSent can quickly move past 7 columns.
Add a couple more to allow for even display.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: Update configure options in installation notes
Donald Sharp [Sun, 16 Feb 2020 19:57:39 +0000 (14:57 -0500)]
doc: Update configure options in installation notes

Add some missing configuration options in the installation notes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoconfigure: Fixup `--disable-irdp` option to reflect reality
Donald Sharp [Sun, 16 Feb 2020 19:39:49 +0000 (14:39 -0500)]
configure: Fixup `--disable-irdp` option to reflect reality

The help text was not properly setup for `--disable-irdp` fix
it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5814 from Jafaral/nhrp-no
Donald Sharp [Sun, 16 Feb 2020 19:15:42 +0000 (14:15 -0500)]
Merge pull request #5814 from Jafaral/nhrp-no

nhrpd: allow no nhrp map cmd to match the configured cmd

4 years agolib: Fix so that `--enable-pcreposix` actually compiles
Donald Sharp [Sun, 16 Feb 2020 19:14:04 +0000 (14:14 -0500)]
lib: Fix so that `--enable-pcreposix` actually compiles

The `--enable-pcreposix` configure option was not actually compiling
properly.  Follow pre-existing pattern for inclusion of regex.h
or the pcreposix.h header.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Show the real reason why the peer is failed
Donatas Abraitis [Fri, 14 Feb 2020 21:21:55 +0000 (23:21 +0200)]
bgpd: Show the real reason why the peer is failed

If the peer was shutdown locally, it doesn't show up as admin. shutdown.
Instead it's treated as "Waiting for peer OPEN".

The same applies to when the peer reaches maximum-prefix count.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years ago*: encode zapi labels message using nexthops
Mark Stapp [Thu, 13 Feb 2020 21:47:41 +0000 (16:47 -0500)]
*: encode zapi labels message using nexthops

Use the zapi_nexthop struct with the mpls_labels
zapi messages instead of the special-purpose (and
more limited) nexthop struct that was being used.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agobgpd: Use the enum properly in a switch for rpki commands
Donald Sharp [Fri, 14 Feb 2020 20:32:40 +0000 (15:32 -0500)]
bgpd: Use the enum properly in a switch for rpki commands

During route-map processing we return an enum, the rpki
code was doing some extra gyrations that were unnecessary.
Simplify.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Ensure we don't crash when registering RA's
Donald Sharp [Fri, 14 Feb 2020 20:15:26 +0000 (15:15 -0500)]
bgpd: Ensure we don't crash when registering RA's

There exists a code path that the ifp can be NULL.
Prevent an accident.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5811 from dslicenc/ipv6_ra_prefixes
Mark Stapp [Fri, 14 Feb 2020 19:44:55 +0000 (14:44 -0500)]
Merge pull request #5811 from dslicenc/ipv6_ra_prefixes

zebra: add all ipv6 global addresses to RA messages

4 years agodoc: Fix borked up syntax for static-linking
Donald Sharp [Fri, 14 Feb 2020 19:11:18 +0000 (14:11 -0500)]
doc: Fix borked up syntax for static-linking

Fix documentation such that it is displayed as intended.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: Fixup some missing syntax
Donald Sharp [Fri, 14 Feb 2020 18:52:15 +0000 (13:52 -0500)]
doc: Fixup some missing syntax

We were missing some syntax indicators for stuff in doc/developer
add them in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: Add some basic how-to for lua
Donald Sharp [Wed, 12 Feb 2020 01:10:26 +0000 (20:10 -0500)]
doc: Add some basic how-to for lua

Add a couple breadcrumbs to get people up and running
with lua when they are trying to develop for it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agonhrpd: allow no nhrp map cmd to match the configured cmd
Jafar Al-Gharaibeh [Fri, 14 Feb 2020 17:49:58 +0000 (11:49 -0600)]
nhrpd: allow no nhrp map cmd to match the configured cmd

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
4 years agotests: Add a evpn-pim test case
Anuradha Karuppiah [Thu, 6 Feb 2020 17:31:05 +0000 (09:31 -0800)]
tests: Add a evpn-pim test case

This is a basic setup and test of evpn-pim.
Create a vxlan device ensure that pim notices this
and setups the appropriate groups and sends them
to the RP.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: pim mlag show commands
Anuradha Karuppiah [Thu, 6 Feb 2020 17:31:03 +0000 (09:31 -0800)]
pimd: pim mlag show commands

1. show ip pim mlag summary
provides MLAG session information and stats
2. show ip pim mlag upstream
displays the upstream entries synced across the MLAG switches

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: handle ipmr-lo operational state changes
Anuradha Karuppiah [Thu, 6 Feb 2020 17:31:00 +0000 (09:31 -0800)]
pimd: handle ipmr-lo operational state changes

ipmr-lo is an internally added device used for multicast vxlan tunnel
termination. This device is not expected to be managed by the admin
however in the case it is accidentally shut we need to be able handle
it by recovering when it is "no shut" again.

Ticket: CM-24985

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: handle nht metric change correctly
Anuradha Karuppiah [Thu, 6 Feb 2020 17:30:58 +0000 (09:30 -0800)]
pimd: handle nht metric change correctly

PIM MLAG DF election API was not being triggered on cost change if the
upstream neighbor remained the same.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agolib: add missing command DESC for MLAG messages
Anuradha Karuppiah [Thu, 6 Feb 2020 17:30:56 +0000 (09:30 -0800)]
lib: add missing command DESC for MLAG messages

This string is used in some logging for e.g. in zclient_read -
>>>>>>>>>>>>>>>>>>>>>>>>>>
    if (zclient_debug)
        zlog_debug("zclient 0x%p command %s VRF %u",
               (void *)zclient, zserv_command_string(command),
               vrf_id);
>>>>>>>>>>>>>>>>>>>>>>>>>>

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: remove peerlink_rif from the orig-mroute OIL when it is oper down
Anuradha Karuppiah [Thu, 6 Feb 2020 17:30:53 +0000 (09:30 -0800)]
pimd: remove peerlink_rif from the orig-mroute OIL when it is oper down

In an anycast VTEP setup the peerlink_rif is added as a static OIF
to the originating mroute (bypassing the pim state machine). This is
needed to ensure both MLAG switches rx a copy of encapsulated BUM flow.

We were not handling link state changes on this static OIF resulting
in the wrong vifi being used in the OIL (because of vifi re-allocation).
This commit re-acts to oper state changes by deleting the OIF on link
down and re-adding it on link up.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: stop overloading SRC_IGMP upstream for vxlan local membership
Anuradha Karuppiah [Thu, 6 Feb 2020 17:30:51 +0000 (09:30 -0800)]
pimd: stop overloading SRC_IGMP upstream for vxlan local membership

A local membership is created on the vxlan termination device ipmr-lo. This
is done to -
1. Pull multicast vxlan tunnel traffic to the VTEP for termination by
triggering JoinDesired on the BUM multicast group.
2. Include the OIF in the mroute to signal to the dataplane component
that flow needs to be vxlan terminated.

Earlier we were overloading the PIM_UPSTREAM_FLAG_MASK_SRC_IGMP for
this local membership creation but that is creating confusion both in
the state machine and in the show outputs. To avoid that we use the
more apparent PIM_UPSTREAM_FLAG_MASK_SRC_VXLAN_TERM. With this change -
1. We get LHR functionality for VXLAN_TERM mroutes
2. OIF is populated with PIM_OIF_FLAG_PROTO_PIM only

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: force update inherited OIL when vxlan local membership is created
Anuradha Karuppiah [Thu, 6 Feb 2020 17:30:48 +0000 (09:30 -0800)]
pimd: force update inherited OIL when vxlan local membership is created

When local member is added the (*, G) entry may already be in a JOINED
state. In that case the OIL is not updated i.e. pim_channel_add_oif is
not happening for ipmr-lo. Because of this the traffic associated with
the multicast vxlan tunnel is pulled down to the VTEP but not terminated
by the kernel.

This change force updates the OIL anytime ipmr-lo is added or removed
as a local member.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: skip syncing and running DF election on orig mroutes
Anuradha Karuppiah [Thu, 6 Feb 2020 17:30:46 +0000 (09:30 -0800)]
pimd: skip syncing and running DF election on orig mroutes

This is not causing functional problems but has become a source
of confusion. DF status is only relevant to multicast tunnel decaps.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: increase RPF metric via the peerlink_rif by plus-10
Anuradha Karuppiah [Thu, 6 Feb 2020 17:30:43 +0000 (09:30 -0800)]
pimd: increase RPF metric via the peerlink_rif by plus-10

The RPF cost is incremented by 10 if the RPF interface is the peerlink-rif.
This is used to force the MLAG switch with the lowest cost to the RPF
to become the MLAG DF. If a switch has to go via the peerlink-rif to get
to the RP or source it simplly cannot be the designated forwarder.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: inherit MLAG DF role from the parent (*, G) entry
Anuradha Karuppiah [Thu, 6 Feb 2020 17:30:40 +0000 (09:30 -0800)]
pimd: inherit MLAG DF role from the parent (*, G) entry

DF election is only run for (*,G) entries i.e. election is skipped
for (S,G) entries that are setup as a result of SPT switchover. (S,G)
entries inherit the DF role from the parent (*,G) entry. So the DF is
responsible for terminating all sources associated with a group.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopim: DF election for tunnel termination mroutes in an anycast-VTEP setup
Anuradha Karuppiah [Thu, 6 Feb 2020 17:30:36 +0000 (09:30 -0800)]
pim: DF election for tunnel termination mroutes in an anycast-VTEP setup

1. Upstream entries associated with tunnel termination mroutes are
synced to the MLAG peer via the local MLAG daemon.
2. These entries are installed in the peer switch (via an upstream
ref flag).
3. DF (Designated Forwarder) election is run per-upstream entry by both
the MLAG switches -
a. The switch with the lowest RPF cost is the DF winner
b. If both switches have the same RPF cost the MLAG role is
used as a tie breaker with the MLAG primary becoming the DF
winner.
4. The DF winner terminates the multicast traffic by adding the tunnel
termination device to the OIL. The non-DF suppresses the termination
device from the OIL.

Note: Before the PIM-MLAG interface was available hidden config was
used to test the EVPN-PIM functionality with MLAG. I have removed the
code to persist that config to avoid confusion. The hidden commands are
still available.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: register with MLAG on the first VxLAN SG
Anuradha Karuppiah [Thu, 6 Feb 2020 17:30:31 +0000 (09:30 -0800)]
pimd: register with MLAG on the first VxLAN SG

Channel with the MLAG daemon is setup on the first VxLAN BUM MDT or
pim-mlag AA SVI.

This channel is used for -
1. rxing MLAG status status updates (peer state, role etc.)
2. for syncing active-active upstream entries with the peer MLAG
switch.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: mlag debug was not being persisted
Anuradha Karuppiah [Thu, 6 Feb 2020 17:29:48 +0000 (09:29 -0800)]
zebra: mlag debug was not being persisted

Added the mlag keyword to the config level also (in addition to the
view level).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: add all ipv6 global addresses to RA messages
Don Slice [Mon, 10 Feb 2020 18:58:41 +0000 (18:58 +0000)]
zebra: add all ipv6 global addresses to RA messages

RFC 4861 states that ipv6 RA messages sent out an interface should
contain all global ipv6 addresses on that interface. This fix adds
that capability.  To override the default flags and timer settings
for a particular prefix, the existing "ipv6 nd prefix ..." command
should be used via vtysh under the appropriate interface.

Ticket: CM-20363
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agobgpd: Print out vrf name as well as id
Donald Sharp [Fri, 14 Feb 2020 05:14:03 +0000 (00:14 -0500)]
bgpd: Print out vrf name as well as id

The vrf_id is not enough context for people.  Use the
actual name of the vrf if you can.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Add vrf name to debug output
Donald Sharp [Fri, 14 Feb 2020 13:41:04 +0000 (08:41 -0500)]
zebra: Add vrf name to debug output

The vrf id is insufficient of a discriminator in people's head
Give them what they need.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoripngd: Add vrf name to debug output
Donald Sharp [Fri, 14 Feb 2020 13:28:29 +0000 (08:28 -0500)]
ripngd: Add vrf name to debug output

The vrf id is insufficient of a discriminator in people's head
Give them what they need.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoripd: Add vrf name to debug output
Donald Sharp [Fri, 14 Feb 2020 13:22:33 +0000 (08:22 -0500)]
ripd: Add vrf name to debug output

The vrf id is insufficient of a discriminator in people's head
Give them what they need.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Add vrf name to outputs/debugs
Donald Sharp [Fri, 14 Feb 2020 13:17:40 +0000 (08:17 -0500)]
lib: Add vrf name to outputs/debugs

Add some additional output/debug to code to allow
us to see the vrf name instead of just the vrf id.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Add a macro to allow for quick/easy display of vrf name
Donald Sharp [Fri, 14 Feb 2020 13:09:25 +0000 (08:09 -0500)]
lib: Add a macro to allow for quick/easy display of vrf name

Add a quick macro to allow for safe dereference of the vrf
since it may or may not exist in all cases.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Format according to our standard
Donald Sharp [Fri, 14 Feb 2020 13:14:31 +0000 (08:14 -0500)]
lib: Format according to our standard

A couple of functions needed to be reformated.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5810 from donaldsharp/fix_yang_routemap
Donatas Abraitis [Fri, 14 Feb 2020 11:41:03 +0000 (13:41 +0200)]
Merge pull request #5810 from donaldsharp/fix_yang_routemap

Fix yang routemap

4 years agosharpd: Add missing yang route-map callbacks
Donald Sharp [Fri, 14 Feb 2020 05:53:43 +0000 (00:53 -0500)]
sharpd: Add missing yang route-map callbacks

sharpd was missing the yang route-map callbacks.
Add it in so it doesn't crash.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: Add missing yang callbacks for route-maps
Donald Sharp [Fri, 14 Feb 2020 05:53:01 +0000 (00:53 -0500)]
pimd: Add missing yang callbacks for route-maps

Pim was missing the yang callbacks for route-maps, causing
it to crash.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5806 from ton31337/fix/remove_break_after_return
Mark Stapp [Thu, 13 Feb 2020 16:32:27 +0000 (11:32 -0500)]
Merge pull request #5806 from ton31337/fix/remove_break_after_return

*: Remove break after return

4 years agoMerge pull request #5805 from donaldsharp/babel_int_return
Mark Stapp [Thu, 13 Feb 2020 16:32:06 +0000 (11:32 -0500)]
Merge pull request #5805 from donaldsharp/babel_int_return

babeld: GCC complaining about no return in non-void function

4 years agoMerge pull request #5787 from karamalla0406/rmac_check
Donatas Abraitis [Thu, 13 Feb 2020 15:50:16 +0000 (17:50 +0200)]
Merge pull request #5787 from karamalla0406/rmac_check

bgpd: RFC compliance wrt invalid RMAC, GWIP, ESI and VNI

4 years agodoc: Override ORIGIN for aggregate-address command
Donatas Abraitis [Wed, 12 Feb 2020 20:53:03 +0000 (22:53 +0200)]
doc: Override ORIGIN for aggregate-address command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agotests: Add test case for `aggregate-address <prefix> origin <origin>`
Donatas Abraitis [Wed, 12 Feb 2020 20:32:55 +0000 (22:32 +0200)]
tests: Add test case for `aggregate-address <prefix> origin <origin>`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobabeld: GCC complaining about no return in non-void function
Donald Sharp [Thu, 13 Feb 2020 13:44:40 +0000 (08:44 -0500)]
babeld: GCC complaining about no return in non-void function

The babel_main_loop function did not have a return for
a non-void function.  For some reason gcc is starting to complain
about this now.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years ago*: Remove break after return
Donatas Abraitis [Thu, 13 Feb 2020 13:21:26 +0000 (15:21 +0200)]
*: Remove break after return

Just a deadcode.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Allow overriding ORIGIN for aggregate-address
Donatas Abraitis [Wed, 12 Feb 2020 19:19:02 +0000 (21:19 +0200)]
bgpd: Allow overriding ORIGIN for aggregate-address

Override ORIGIN attribute if defined.
E.g.: Cisco and Juniper set ORIGIN for aggregated address
to IGP which is not what rfc4271 says.

This enables the same behavior, optionally.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5798 from donaldsharp/bgp_packet_reformat
Sri Mohana Singamsetty [Thu, 13 Feb 2020 00:25:49 +0000 (16:25 -0800)]
Merge pull request #5798 from donaldsharp/bgp_packet_reformat

bgpd: Reformat bpacket_reformat_for_peer

4 years agobgpd: Further peer_sort refinements
Donald Sharp [Wed, 12 Feb 2020 19:41:11 +0000 (14:41 -0500)]
bgpd: Further peer_sort refinements

Track the returned peer_sorted value and use it where
we can and recalculate where necessary.

This is an effort to reduce the amount of work done here.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Create peer_sort_lookup()
Donald Sharp [Wed, 12 Feb 2020 18:26:19 +0000 (13:26 -0500)]
bgpd: Create peer_sort_lookup()

The act of peer_sort() being called always set this value
even when we are just looking it up.  We need to seperate
out the idea of lookup from set.

For those places that this is immediately obvious that
this is a lookup switch over to using this function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Reformat bpacket_reformat_for_peer
Donald Sharp [Tue, 11 Feb 2020 03:03:02 +0000 (22:03 -0500)]
bgpd: Reformat bpacket_reformat_for_peer

This function was heavily indented, reformat to reduce indentation
levels a bit.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5794 from mjstapp/remove_nexthop_matched_flag
Quentin Young [Wed, 12 Feb 2020 16:29:22 +0000 (11:29 -0500)]
Merge pull request #5794 from mjstapp/remove_nexthop_matched_flag

lib,zebra: remove unused MATCHED nexthop flag

4 years agolib,zebra: remove unused MATCHED nexthop flag
Mark Stapp [Tue, 11 Feb 2020 16:14:37 +0000 (11:14 -0500)]
lib,zebra: remove unused MATCHED nexthop flag

Remove an unused flag value from the nexthop struct.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agobgpd: support 'show ip bgp large-community" on default vrf
Kishore Aramalla [Mon, 10 Feb 2020 20:23:04 +0000 (12:23 -0800)]
bgpd: support 'show ip bgp large-community" on default vrf

This command works only in the case of vrf/view.
Adding support for default VRF as well.

Signed-off-by: Kishore Aramalla <karamalla@vmware.com>
4 years agobgpd: RFC compliance wrt invalid RMAC, GWIP, ESI and VNI
Kishore Aramalla [Mon, 10 Feb 2020 19:38:27 +0000 (11:38 -0800)]
bgpd: RFC compliance wrt invalid RMAC, GWIP, ESI and VNI

A route where ESI, GW IP, MAC and Label are all zero at the same time SHOULD
be treat-as-withdraw.
Invalid MAC addresses are broadcast or multicast MAC addresses. The route
MUST be treat-as-withdraw in case of an invalid MAC address.

As FRR support Ethernet NVO Tunnels only.
Route will be withdrawn when ESI, GW IP and MAC are zero or Invalid MAC

Test cases:
1) ET-5 route with valid RMAC extended community
2) ET-5 route no RMAC extended community
3) ET-5 route with Multicast MAC in RMAC extended community
4) ET-5 route with Broadcast MAC in RMAC extended community

Signed-off-by: Kishore Aramalla <karamalla@vmware.com>