]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agopimd: avoiding crash in wrvifwhole path
saravanank [Tue, 24 Mar 2020 08:26:25 +0000 (01:26 -0700)]
pimd: avoiding crash in wrvifwhole path

Observed crash in the wrvif whole path.

RCA: Wrongvif path trying to access pim attributes of pim disabled RPF interface.
This was resulting in Null access.

(gdb) p/x rpf->source_nexthop
$19 = {last_lookup = {s_addr = 0xa282828}, last_lookup_time = 0x59c0de0828c98,
  interface = 0x1013e5011300, mrib_nexthop_addr = {family = 0x2,
    prefixlen = 0x20, u = {prefix = 0x28, prefix4 = {s_addr = 0xa282828},
      prefix6 = {__in6_u = {__u6_addr8 = {0x28, 0x28, 0x28, 0xa,
            0x0 <repeats 12 times>}, __u6_addr16 = {0x2828, 0xa28, 0x0, 0x0,
            0x0, 0x0, 0x0, 0x0}, __u6_addr32 = {0xa282828, 0x0, 0x0, 0x0}}},
      lp = {id = {s_addr = 0xa282828}, adv_router = {s_addr = 0x0}},
      prefix_eth = {octet = {0x28, 0x28, 0x28, 0xa, 0x0, 0x0}}, val = {0x28,
        0x28, 0x28, 0xa, 0x0 <repeats 12 times>}, ptr = 0xa282828,
      prefix_evpn = {route_type = 0x28, u = {_ead_addr = {esi = {val = {0x0,
                0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}, eth_tag = 0x0},
          _macip_addr = {eth_tag = 0x0, ip_prefix_length = 0x0, mac = {
              octet = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}, ip = {ipa_type = 0x0,
              ip = {addr = 0x0, _v4_addr = {s_addr = 0x0}, _v6_addr = {
                  __in6_u = {__u6_addr8 = {0x0 <repeats 16 times>},
                    __u6_addr16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
                    __u6_addr32 = {0x0, 0x0, 0x0, 0x0}}}}}}, _imet_addr = {
            eth_tag = 0x0, ip_prefix_length = 0x0, ip = {ipa_type = 0x0, ip = {
                addr = 0x0, _v4_addr = {s_addr = 0x0}, _v6_addr = {__in6_u = {
                    __u6_addr8 = {0x0 <repeats 16 times>}, __u6_addr16 = {0x0,
                      0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, __u6_addr32 = {0x0,
                      0x0, 0x0, 0x0}}}}}}, _es_addr = {esi = {val = {0x0, 0x0,
                0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}},
---Type <return> to continue, or q <return> to quit---q
ip_prefix_length = 0x0Quit
(gdb) p/x rpf->source_nexthop.interface
$20 = 0x1013e5011300
(gdb) p/x rpf->source_nexthop.interface->info
$21 = 0x0 <======================== Pim & Igmp is disabled on this interface

Fix: Return when the rpf interface is not pim enabled

Signed-off-by: Saravanan K <saravanank@vmware.com>
4 years agoMerge pull request #6003 from ton31337/fix/skip_kitchen_files
Donald Sharp [Sun, 15 Mar 2020 23:11:15 +0000 (19:11 -0400)]
Merge pull request #6003 from ton31337/fix/skip_kitchen_files

git: Skip .kitchen files

4 years agogit: Skip .kitchen files
Donatas Abraitis [Sun, 15 Mar 2020 20:27:33 +0000 (22:27 +0200)]
git: Skip .kitchen files

I use kitchen (https://github.com/test-kitchen/kitchen-vagrant) for
development labs environment. Just skip those garbage files.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5854 from qlyoung/fix-zapi-ipset-entry-bad-family
Donatas Abraitis [Sat, 14 Mar 2020 12:19:13 +0000 (14:19 +0200)]
Merge pull request #5854 from qlyoung/fix-zapi-ipset-entry-bad-family

zebra: check for invalid family in ipset entry msg

4 years agoMerge pull request #5972 from rubenk/eigrpd-remove-workaround-for-old-openbsd
Donald Sharp [Fri, 13 Mar 2020 11:20:20 +0000 (07:20 -0400)]
Merge pull request #5972 from rubenk/eigrpd-remove-workaround-for-old-openbsd

eigrpd: stop checking for ancient OpenBSD

4 years agoMerge pull request #5985 from Naveenaidu/5984-cleanup-is_selfroute
Donald Sharp [Thu, 12 Mar 2020 23:19:53 +0000 (19:19 -0400)]
Merge pull request #5985 from Naveenaidu/5984-cleanup-is_selfroute

zebra/rt_netlink.c: Clean is_selfroute function

4 years agoMerge pull request #5991 from pguibert6WIND/bfd_corner_bgp_update_source
Donald Sharp [Thu, 12 Mar 2020 17:31:22 +0000 (13:31 -0400)]
Merge pull request #5991 from pguibert6WIND/bfd_corner_bgp_update_source

bgpd: upon reconfiguration or bgp exchange failure, stop bfd.

4 years agoMerge pull request #5827 from donaldsharp/missed_upstreaming
Sri Mohana Singamsetty [Thu, 12 Mar 2020 16:27:26 +0000 (09:27 -0700)]
Merge pull request #5827 from donaldsharp/missed_upstreaming

Missed upstreaming

4 years agoMerge pull request #5979 from ton31337/fix/convert_to_bool_some_functions
Sri Mohana Singamsetty [Thu, 12 Mar 2020 16:26:21 +0000 (09:26 -0700)]
Merge pull request #5979 from ton31337/fix/convert_to_bool_some_functions

bgpd: Convert type int functions to bool which return 0/1 only

4 years agoMerge pull request #5981 from ton31337/fix/not_necessary_checks
Mark Stapp [Thu, 12 Mar 2020 13:45:55 +0000 (09:45 -0400)]
Merge pull request #5981 from ton31337/fix/not_necessary_checks

*: Remove tests for some XFREE-family functions

4 years agoMerge pull request #5974 from donaldsharp/ldp_ifindex_missed
Mark Stapp [Thu, 12 Mar 2020 12:58:38 +0000 (08:58 -0400)]
Merge pull request #5974 from donaldsharp/ldp_ifindex_missed

ldpd: During code inspection we are mixing data sizes

4 years agobgpd: upon reconfiguration or bgp exchange failure, stop bfd.
Philippe Guibert [Tue, 10 Mar 2020 08:20:09 +0000 (09:20 +0100)]
bgpd: upon reconfiguration or bgp exchange failure, stop bfd.

When bgp is updated with local source, the bgp session is reset; bfd
also must be reset. The bgp_stop() handler handles all kind of
unexpected failures, so the placeholder to deregister from bfd should be
ok, providing that when bgp establishes, a similar function in bgp will
recreate bfd context.
Note that the bfd session is not reset on one specific case, where BFD
down event is the last reset. In that case, we must let BFD to monitor
the link.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agoMerge pull request #5952 from ton31337/fix/no_need_for_if_in_filter_override
Sri Mohana Singamsetty [Wed, 11 Mar 2020 19:21:58 +0000 (12:21 -0700)]
Merge pull request #5952 from ton31337/fix/no_need_for_if_in_filter_override

bgpd: Do not check for a maximum for peer->filter_override

4 years agozebra/rt_netlink.c: Clean is_selfroute function
Naveen Naidu [Wed, 11 Mar 2020 18:20:41 +0000 (23:50 +0530)]
zebra/rt_netlink.c: Clean is_selfroute function

The return type of is_selfroute function is changed from int to bool.
Also remove the redundant invoking of the is_selfroute function in the
calling function netlink_route_change_read_unicast

Fixes: https://github.com/FRRouting/frr/issues/5984
Signed-off-by: Naveen Naidu <naveennaidu479@gmail.com>
4 years agoMerge pull request #5973 from rubenk/ospfd-fix-wrong-operator
Donald Sharp [Wed, 11 Mar 2020 17:09:40 +0000 (13:09 -0400)]
Merge pull request #5973 from rubenk/ospfd-fix-wrong-operator

ospfd: fix range check for metric

4 years agoMerge pull request #5975 from rubenk/zebra-use-modern-function-definition
Donald Sharp [Wed, 11 Mar 2020 17:09:18 +0000 (13:09 -0400)]
Merge pull request #5975 from rubenk/zebra-use-modern-function-definition

zebra: use modern C function definition

4 years ago*: Remove tests for some XFREE-family functions
Donatas Abraitis [Wed, 11 Mar 2020 16:16:23 +0000 (18:16 +0200)]
*: Remove tests for some XFREE-family functions

XFREE() covers that.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Convert type int functions to bool which return 0/1 only
Donatas Abraitis [Wed, 11 Mar 2020 15:09:11 +0000 (17:09 +0200)]
bgpd: Convert type int functions to bool which return 0/1 only

This is only for bgp_aspath.[ch]

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5966 from rubenk/isisd-fix-build-warnings
Donald Sharp [Wed, 11 Mar 2020 14:45:07 +0000 (10:45 -0400)]
Merge pull request #5966 from rubenk/isisd-fix-build-warnings

isisd: fix a bunch of build warnings with GCC 10

4 years agozebra: use modern C function definition
Ruben Kerkhof [Wed, 11 Mar 2020 13:06:34 +0000 (14:06 +0100)]
zebra: use modern C function definition

And also remove an assignment without effect while we're here.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agoldpd: During code inspection we are mixing data sizes
Donald Sharp [Wed, 11 Mar 2020 13:03:17 +0000 (09:03 -0400)]
ldpd: During code inspection we are mixing data sizes

As I understand it ldpd was originally developed as a standalone
daemon for *BSD land.  Then ported to FRR.  FRR uses ifindex_t
as the base type for the ifindex.  Mixing `unsigned short` and
`int` and `unsigned int` is going to lead to fun somewhere
along the way.  Especially when we get to run on a system
with ifindex churn( I'm looking at you docker ).

Attempt to convert all of ldpd to think of the ifindex as a
`ifindex_t`.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoospfd: fix range check for metric
Ruben Kerkhof [Wed, 11 Mar 2020 12:56:26 +0000 (13:56 +0100)]
ospfd: fix range check for metric

Found with -Wlogical-op

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agoeigrpd: stop checking for ancient OpenBSD
Ruben Kerkhof [Wed, 11 Mar 2020 12:31:13 +0000 (13:31 +0100)]
eigrpd: stop checking for ancient OpenBSD

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agoisisd: fix a bunch of build warnings with GCC 10
Ruben Kerkhof [Wed, 11 Mar 2020 09:37:37 +0000 (10:37 +0100)]
isisd: fix a bunch of build warnings with GCC 10

GCC 10 thinks we memcpy into a 0-sized array (which we're not).
Use a C99 flexible array member instead.

Fixes:

  CC       lib/stream.lo
lib/stream.c: In function ‘stream_put_in_addr’:
lib/stream.c:824:2: warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=]
  824 |  memcpy(s->data + s->endp, addr, sizeof(uint32_t));
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

isisd/isis_tlvs.c: In function ‘auth_validator_hmac_md5’:
isisd/isis_tlvs.c:4279:2: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
 4279 |  memcpy(STREAM_DATA(stream) + auth->offset, auth->value, 16);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘update_auth_hmac_md5’,
    inlined from ‘update_auth’ at isisd/isis_tlvs.c:3734:4,
    inlined from ‘isis_pack_tlvs’ at isisd/isis_tlvs.c:3897:2:
isisd/isis_tlvs.c:3722:2: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]
 3722 |  memcpy(STREAM_DATA(s) + auth->offset, digest, 16);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
isisd/isis_tlvs.c:3722:2: warning: writing 16 bytes into a region of size 0 [-Wstringop-overflow=]

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agoMerge pull request #5962 from donaldsharp/whichafisafi
Donatas Abraitis [Wed, 11 Mar 2020 09:18:02 +0000 (11:18 +0200)]
Merge pull request #5962 from donaldsharp/whichafisafi

bgpd: When deleting an afi/safi and we fail give more detail

4 years agoMerge pull request #5957 from pguibert6WIND/two_bfd_fixes
Donatas Abraitis [Wed, 11 Mar 2020 09:17:32 +0000 (11:17 +0200)]
Merge pull request #5957 from pguibert6WIND/two_bfd_fixes

Two bfd fixes

4 years agoMerge pull request #5938 from donaldsharp/redistribute_afi
Sri Mohana Singamsetty [Tue, 10 Mar 2020 22:32:16 +0000 (15:32 -0700)]
Merge pull request #5938 from donaldsharp/redistribute_afi

zebra: Only redistribute default routes of the right afi

4 years agoMerge pull request #5961 from rubenk/build-fix-werror-undef
Sri Mohana Singamsetty [Tue, 10 Mar 2020 21:30:45 +0000 (14:30 -0700)]
Merge pull request #5961 from rubenk/build-fix-werror-undef

build: fix building with -Werror=undef

4 years agobgpd: When deleting an afi/safi and we fail give more detail
Donald Sharp [Tue, 10 Mar 2020 18:54:18 +0000 (14:54 -0400)]
bgpd: When deleting an afi/safi and we fail give more detail

It would be nice to know which afi/safi we couldn't delete
on a peer in the flog message.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotreewide: fix some issues found with -Werror=undef
Ruben Kerkhof [Tue, 10 Mar 2020 15:50:03 +0000 (16:50 +0100)]
treewide: fix some issues found with -Werror=undef

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agoMerge pull request #5951 from rubenk/docs-fix-warning
Quentin Young [Tue, 10 Mar 2020 15:40:41 +0000 (11:40 -0400)]
Merge pull request #5951 from rubenk/docs-fix-warning

Fix a warning while building manpages

4 years agoMerge pull request #5953 from ton31337/fix/move_coccinelle_to_tools
Quentin Young [Tue, 10 Mar 2020 15:36:59 +0000 (11:36 -0400)]
Merge pull request #5953 from ton31337/fix/move_coccinelle_to_tools

tools: Move scripts/coccinelle to tools/coccinelle

4 years agobuild: fix building with -Werror=undef
Ruben Kerkhof [Tue, 10 Mar 2020 15:27:50 +0000 (16:27 +0100)]
build: fix building with -Werror=undef

In the unlikely event you are building with -Werror=undef, several
configure checks fail. Fix those.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agoMerge pull request #5877 from donaldsharp/pim_shutdown_cleanup
Donatas Abraitis [Tue, 10 Mar 2020 15:05:12 +0000 (17:05 +0200)]
Merge pull request #5877 from donaldsharp/pim_shutdown_cleanup

Pim shutdown cleanup

4 years agodoc: Add `show bgp listener` command
Donald Sharp [Tue, 18 Feb 2020 20:28:42 +0000 (15:28 -0500)]
doc: Add `show bgp listener` command

Add a bit of debug to show the listener sockets and who created them
to associate with strace output for a developer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Fix router-id update handling for route-leaking
vivek [Tue, 17 Sep 2019 01:28:44 +0000 (18:28 -0700)]
bgpd: Fix router-id update handling for route-leaking

If the default BGP instance is importing routes from another instance and
the latter has a router-id update, the update handler needs to handle the
default instance in a special way.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-26007
Reviewed By: CCR-9108
Testing Done: Detailed verification in 3.x

4 years agobgpd: Ensure NHT registration is not attempted for peer-group
vivek [Fri, 6 Sep 2019 04:13:59 +0000 (21:13 -0700)]
bgpd: Ensure NHT registration is not attempted for peer-group

Ensure that the late registration for NHT done for IPv4 route exchange
over IPv6 GUA peering is not attempted for peer-groups, only for peers.

Fixes: "bgpd: Late registration of Extended Nexthop"
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Readd special flood MAC upon del notification
vivek [Fri, 6 Sep 2019 04:11:07 +0000 (21:11 -0700)]
zebra: Readd special flood MAC upon del notification

Readd the special MAC that represents the flood (head-end replication) entry
for EVPN-VxLAN upon getting a delete notification for it.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
Ticket:  CM-25797
Ticket: CM-26238
Testing Done:
1. evpn-min, evpn-smoke - results summarized in CM-25798

4 years agolib: immediately ping systemd when started
Quentin Young [Fri, 2 Aug 2019 19:18:00 +0000 (19:18 +0000)]
lib: immediately ping systemd when started

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agopimd: ifchannel deletion should tell you the interface
Donald Sharp [Tue, 11 Jun 2019 12:34:23 +0000 (12:34 +0000)]
pimd: ifchannel deletion should tell you the interface

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: add debug in specific neigh fetch
Chirag Shah [Wed, 27 Mar 2019 01:23:58 +0000 (18:23 -0700)]
zebra: add debug in specific neigh fetch

add debug trace in specific neigh request send api
to help debug an issue where synchronous response parse
returns with NLMSG_DONE where there is no ipv6 neigh received.
the count value is set to 1 because the request contained
a spcific neigh.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
4 years agobgpd: Add 'show bgp listeners' command for diagnostics
Donald Sharp [Fri, 19 Apr 2019 12:52:01 +0000 (08:52 -0400)]
bgpd: Add 'show bgp listeners' command for diagnostics

Add a command to display listen sockets and the vrf that they
are associated with.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5955 from dslicenc/v6-ra-leak
Mark Stapp [Tue, 10 Mar 2020 13:53:42 +0000 (09:53 -0400)]
Merge pull request #5955 from dslicenc/v6-ra-leak

zebra: delete ipv6 RA prefix entries when zebra is killed

4 years agobgpd: reset bfd session when bgp comes up
Philippe Guibert [Tue, 10 Mar 2020 13:34:36 +0000 (14:34 +0100)]
bgpd: reset bfd session when bgp comes up

This scenario has been seen against microtik virtual machine with bfd
enabled. When remote microtik bgp reestablishes the bgp session after a
bgp reset, the bgp establishment comes first, then bfd is initialising.
The second point is true for microtik, but not for frrouting, as the
frrouting, when receiving bfd down messages, is not at init state.
Actually, bfd state is up, and sees the first bfd down packet from bfd
as an issue. Consequently, the BGP session is cleared.
The fix consists in resetting the BFD session, once BGP comes up. That
permits to align state machines of both local and remote bfd.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agobgpd: upon reconfiguration or bgp exchange failure, stop bfd.
Philippe Guibert [Tue, 10 Mar 2020 08:20:09 +0000 (09:20 +0100)]
bgpd: upon reconfiguration or bgp exchange failure, stop bfd.

When bgp is updated with local source, the bgp session is reset; bfd
also must be reset. The bgp_stop() handler handles all kind of
unexpected failures, so the placeholder to deregister from bfd should be
ok, providing that when bgp establishes, a similar function in bgp will
recreate bfd context.
Note that the bfd session is not reset on one specific case, where BFD
down event is the last reset. In that case, we must let BFD to monitor
the link.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: delete ipv6 RA prefix entries when zebra is killed
Don Slice [Tue, 10 Mar 2020 10:57:30 +0000 (10:57 +0000)]
zebra: delete ipv6 RA prefix entries when zebra is killed

Memory leak found where ipv6 global prefixes added to the router
advertisement prefix lists were not deleted when the process was
killed.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
4 years agotools: Move scripts/coccinelle to tools/coccinelle
Donatas Abraitis [Tue, 10 Mar 2020 09:41:03 +0000 (11:41 +0200)]
tools: Move scripts/coccinelle to tools/coccinelle

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agodocs: fix a warning while building manpages
Ruben Kerkhof [Tue, 10 Mar 2020 09:31:02 +0000 (10:31 +0100)]
docs: fix a warning while building manpages

$ make doc
  SPHINX   doc/manpages/_build/.doctrees/environment.pickle
WARNING: html_static_path entry '_static' does not exist

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agobgpd: Do not check for a maximum for peer->filter_override
Donatas Abraitis [Tue, 10 Mar 2020 09:29:48 +0000 (11:29 +0200)]
bgpd: Do not check for a maximum for peer->filter_override

FILTER_MAX is 2, RMAP_MAX is 2. No point here.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5948 from qlyoung/fix-no-bgp-nexthop-vpn-export
Donatas Abraitis [Tue, 10 Mar 2020 05:37:55 +0000 (07:37 +0200)]
Merge pull request #5948 from qlyoung/fix-no-bgp-nexthop-vpn-export

bgpd: fix 'no nexthop vpn export'

4 years agoMerge pull request #5949 from qlyoung/doc-fix-cli-source-references-order
Donatas Abraitis [Tue, 10 Mar 2020 05:36:58 +0000 (07:36 +0200)]
Merge pull request #5949 from qlyoung/doc-fix-cli-source-references-order

doc: CLI source references backwards

4 years agoMerge pull request #5950 from qlyoung/fix-null-check-before-xfree-yet-again
Donatas Abraitis [Tue, 10 Mar 2020 05:26:40 +0000 (07:26 +0200)]
Merge pull request #5950 from qlyoung/fix-null-check-before-xfree-yet-again

lib, zebra: remove nullity check before XFREE...

4 years agolib, zebra: remove nullity check before XFREE...
Quentin Young [Mon, 9 Mar 2020 22:16:32 +0000 (18:16 -0400)]
lib, zebra: remove nullity check before XFREE...

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5839 from donaldsharp/upstream_merge
Russ White [Mon, 9 Mar 2020 19:34:18 +0000 (15:34 -0400)]
Merge pull request #5839 from donaldsharp/upstream_merge

Upstream merge of missed MLAG code

4 years agodoc: CLI source references backwards
Quentin Young [Mon, 9 Mar 2020 19:27:25 +0000 (15:27 -0400)]
doc: CLI source references backwards

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: fix 'no nexthop vpn export'
Quentin Young [Mon, 9 Mar 2020 18:55:37 +0000 (14:55 -0400)]
bgpd: fix 'no nexthop vpn export'

ALIAS without parameters against DEFPY w/ required parameters doesn't
work

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5942 from patrasar/2438087
Donald Sharp [Mon, 9 Mar 2020 12:47:10 +0000 (08:47 -0400)]
Merge pull request #5942 from patrasar/2438087

pimd: Display mroute uptime per (s,g) entry

4 years agopimd: Display mroute uptime per (s,g) entry
Sarita Patra [Mon, 9 Mar 2020 07:30:34 +0000 (00:30 -0700)]
pimd: Display mroute uptime per (s,g) entry

Issue: show ip mroute displays the mroute uptime (time when
mroute installed into the kernel) per oif.
This is confusing.

Fix: Display mroute uptime per (s,g) mroute entry.

Signed-off-by: Sarita Patra <saritap@vmware.com>
4 years agoMerge pull request #5919 from qlyoung/fix-vrrp-mvl-uaf
Donatas Abraitis [Mon, 9 Mar 2020 06:03:34 +0000 (08:03 +0200)]
Merge pull request #5919 from qlyoung/fix-vrrp-mvl-uaf

vrrpd: Fix heap uaf when handling interface deletions

4 years agoMerge pull request #5936 from rubenk/ldpd-fix-some-more-linking-issues-with-gcc10
Donald Sharp [Mon, 9 Mar 2020 00:04:42 +0000 (20:04 -0400)]
Merge pull request #5936 from rubenk/ldpd-fix-some-more-linking-issues-with-gcc10

Ldpd: fix some more linking issues with gcc10

4 years agoMerge pull request #5922 from pguibert6WIND/nhrp_override_fix
Donald Sharp [Mon, 9 Mar 2020 00:03:14 +0000 (20:03 -0400)]
Merge pull request #5922 from pguibert6WIND/nhrp_override_fix

Revert "nhrpd: ignore zebra updates about our routes being deleted/ad…

4 years agoMerge pull request #5935 from rubenk/tests-fix-linking-with-gcc10
Donald Sharp [Mon, 9 Mar 2020 00:01:38 +0000 (20:01 -0400)]
Merge pull request #5935 from rubenk/tests-fix-linking-with-gcc10

tests: fix build with GCC 10

4 years agoMerge pull request #5937 from ton31337/fix/sizeof
Donald Sharp [Mon, 9 Mar 2020 00:01:10 +0000 (20:01 -0400)]
Merge pull request #5937 from ton31337/fix/sizeof

*: Replace `sizeof something` to sizeof(something)

4 years agozebra: Only redistribute default routes of the right afi
Donald Sharp [Sun, 8 Mar 2020 22:48:20 +0000 (18:48 -0400)]
zebra: Only redistribute default routes of the right afi

Upper level clients ask for default routes of a particular family
This change ensures that they only receive the family that they
have asked for.

Discovered when testing in ospf `default-information originate`

=================================================================
==246306==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffffffa2e8 at pc 0x7ffff73c44e2 bp 0x7fffffffa090 sp 0x7fffffffa088
READ of size 16 at 0x7fffffffa2e8 thread T0
    #0 0x7ffff73c44e1 in prefix_copy lib/prefix.c:310
    #1 0x7ffff741c0aa in route_node_lookup lib/table.c:255
    #2 0x5555556cd263 in ospf_external_info_delete ospfd/ospf_asbr.c:178
    #3 0x5555556a47cc in ospf_zebra_read_route ospfd/ospf_zebra.c:852
    #4 0x7ffff746f5d8 in zclient_read lib/zclient.c:3028
    #5 0x7ffff742fc91 in thread_call lib/thread.c:1549
    #6 0x7ffff7374642 in frr_run lib/libfrr.c:1093
    #7 0x5555555bfaef in main ospfd/ospf_main.c:235
    #8 0x7ffff70a2bba in __libc_start_main ../csu/libc-start.c:308
    #9 0x5555555bf499 in _start (/usr/lib/frr/ospfd+0x6b499)

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years ago*: Replace `sizeof something` to sizeof(something)
Donatas Abraitis [Sun, 8 Mar 2020 19:43:26 +0000 (21:43 +0200)]
*: Replace `sizeof something` to sizeof(something)

Satisfy checkpatch.pl requirements (check for sizeof without parenthesis)

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoldpd: remove multiple definitions of thread_master
Ruben Kerkhof [Sun, 8 Mar 2020 19:21:05 +0000 (20:21 +0100)]
ldpd: remove multiple definitions of thread_master

This fixes the last issue compiling FRR with GCC 10 on Fedora Rawhide.

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agoldpd: fix another linking issue with GCC-10
Ruben Kerkhof [Sun, 8 Mar 2020 19:17:42 +0000 (20:17 +0100)]
ldpd: fix another linking issue with GCC-10

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agoMerge pull request #5934 from rubenk/ldpd-fix-linking-error-with-gcc-10
Donald Sharp [Sun, 8 Mar 2020 17:47:03 +0000 (13:47 -0400)]
Merge pull request #5934 from rubenk/ldpd-fix-linking-error-with-gcc-10

Fix linking error on Fedora Rawhide with GCC 10

4 years agotests: fix build with GCC 10
Ruben Kerkhof [Sun, 8 Mar 2020 16:17:49 +0000 (17:17 +0100)]
tests: fix build with GCC 10

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agoldpd: Fix linking error on Fedora Rawhide with GCC 10
Ruben Kerkhof [Sun, 8 Mar 2020 14:34:40 +0000 (15:34 +0100)]
ldpd: Fix linking error on Fedora Rawhide with GCC 10

GCC 10 switched to -fno-common by default, see
https://gcc.gnu.org/gcc-10/porting_to.html#common for details.

Fixes:
  CCLD     ldpd/ldpd
/usr/bin/ld: ldpd/libldp.a(adjacency.o):/home/ruben/src/frr/ldpd/ldpe.h:294: multiple definition of `pkt_ptr'; ldpd/ldpd.o:/home/ruben/src/frr/ldpd/ldpe.h:294: first defined here

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agoMerge pull request #5933 from rgirada/frr-static
Donald Sharp [Sun, 8 Mar 2020 14:56:19 +0000 (10:56 -0400)]
Merge pull request #5933 from rgirada/frr-static

staticd: Fixing memory leak issue

4 years agoMerge pull request #5915 from donaldsharp/more_more_more
Russ White [Sun, 8 Mar 2020 14:49:11 +0000 (10:49 -0400)]
Merge pull request #5915 from donaldsharp/more_more_more

More more more

4 years agoMerge pull request #5932 from rubenk/babeld-fix-build-on-rawhide
Donald Sharp [Sun, 8 Mar 2020 01:29:52 +0000 (20:29 -0500)]
Merge pull request #5932 from rubenk/babeld-fix-build-on-rawhide

babeld: fix build on Fedora Rawhide

4 years agostaticd: Fixing memory leak issue
rgirada [Sun, 8 Mar 2020 01:22:52 +0000 (17:22 -0800)]
staticd: Fixing memory leak issue

Memory allotted for staticd specific vrf structers is not
being deallocated when the corresponding vrf is destroyed.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoMerge pull request #5931 from rubenk/vrrpd-fix-build-on-rawhide
Donald Sharp [Sun, 8 Mar 2020 01:09:29 +0000 (20:09 -0500)]
Merge pull request #5931 from rubenk/vrrpd-fix-build-on-rawhide

vrrpd: fix build on Fedora Rawhide

4 years agoMerge pull request #5929 from rubenk/remove-unused-variable
Donald Sharp [Sun, 8 Mar 2020 01:08:56 +0000 (20:08 -0500)]
Merge pull request #5929 from rubenk/remove-unused-variable

bgpd: remove unused variable

4 years agoMerge pull request #5930 from rubenk/fix-staticd-build-on-rawhide
Donald Sharp [Sun, 8 Mar 2020 00:53:12 +0000 (19:53 -0500)]
Merge pull request #5930 from rubenk/fix-staticd-build-on-rawhide

staticd: fix build on Fedora Rawhide

4 years agobabeld: fix build on Fedora Rawhide
Ruben Kerkhof [Sat, 7 Mar 2020 22:51:34 +0000 (23:51 +0100)]
babeld: fix build on Fedora Rawhide

Fixes the following linker errors:
/usr/bin/ld: babeld/libbabel.a(babel_interface.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
/usr/bin/ld: babeld/libbabel.a(babel_zebra.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
/usr/bin/ld: babeld/libbabel.a(babeld.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
/usr/bin/ld: babeld/libbabel.a(kernel.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
/usr/bin/ld: babeld/libbabel.a(message.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
/usr/bin/ld: babeld/libbabel.a(neighbour.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
/usr/bin/ld: babeld/libbabel.a(net.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
/usr/bin/ld: babeld/libbabel.a(resend.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
/usr/bin/ld: babeld/libbabel.a(route.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
/usr/bin/ld: babeld/libbabel.a(source.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
/usr/bin/ld: babeld/libbabel.a(util.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
/usr/bin/ld: babeld/libbabel.a(xroute.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
/usr/bin/ld: babeld/libbabel.a(babel_filter.o):/home/ruben/src/frr/babeld/util.h:125: multiple definition of `v4prefix'; babeld/babel_main.o:/home/ruben/src/frr/babeld/util.h:125: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:6015: babeld/babeld] Error 1

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agovrrpd: fix build on Fedora Rawhide
Ruben Kerkhof [Sat, 7 Mar 2020 22:38:14 +0000 (23:38 +0100)]
vrrpd: fix build on Fedora Rawhide

Fixes the following linker errors:
make[1]: Entering directory '/home/ruben/src/frr'
  CCLD     vrrpd/vrrpd
/usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_arp.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_debug.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_ndisc.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_packet.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_vty.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: multiple definition of `vrrp_dbg_zebra'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:34: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: multiple definition of `vrrp_dbg_sock'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:33: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: multiple definition of `vrrp_dbg_proto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:32: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: multiple definition of `vrrp_dbg_pkt'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:31: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: multiple definition of `vrrp_dbg_ndisc'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:30: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: multiple definition of `vrrp_dbg_auto'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:29: first defined here
/usr/bin/ld: vrrpd/libvrrp.a(vrrp_zebra.o):/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: multiple definition of `vrrp_dbg_arp'; vrrpd/vrrp_main.o:/home/ruben/src/frr/vrrpd/vrrp_debug.h:28: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:6639: vrrpd/vrrpd] Error 1
make[1]: Leaving directory '/home/ruben/src/frr'
make: *** [Makefile:4525: all] Error 2

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agoMerge pull request #5904 from donaldsharp/close_it
Donatas Abraitis [Sat, 7 Mar 2020 22:37:08 +0000 (00:37 +0200)]
Merge pull request #5904 from donaldsharp/close_it

vtysh: Fixup extract.pl to intentionally fail on error

4 years agostaticd: fix build on Fedora Rawhide
Ruben Kerkhof [Sat, 7 Mar 2020 22:30:44 +0000 (23:30 +0100)]
staticd: fix build on Fedora Rawhide

Fixes the following linker issue:
 CC       staticd/static_main.o
  CC       staticd/static_debug.o
  CC       staticd/static_vty.o
  AR       staticd/libstatic.a
  CCLD     staticd/staticd
/usr/bin/ld: staticd/libstatic.a(static_debug.o):/home/ruben/src/frr/staticd/static_debug.h:32: multiple definition of `static_dbg_events'; staticd/static_main.o:/home/ruben/src/frr/staticd/static_debug.h:32: first defined here

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years agobgpd: remove unused variable
Ruben Kerkhof [Sat, 7 Mar 2020 22:19:13 +0000 (23:19 +0100)]
bgpd: remove unused variable

This fixes a linking issue on Fedora Rawhide:
/usr/bin/ld: bgpd/libbgp.a(bgp_flowspec.o):/home/ruben/src/frr/./bgpd/bgp_attr_evpn.h:37: multiple definition of `eth_tag_id'; bgpd/bgp_btoa-bgp_btoa.o:/home/ruben/src/frr/./bgpd/bgp_attr_evpn.h:37: first defined here
collect2: error: ld returned 1 exit status

Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
4 years ago*: Tell git to ignore gcov output files
Donald Sharp [Thu, 5 Mar 2020 14:42:25 +0000 (09:42 -0500)]
*: Tell git to ignore gcov output files

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: nhg->nexthop is not NULL
Donald Sharp [Thu, 5 Mar 2020 14:28:58 +0000 (09:28 -0500)]
zebra: nhg->nexthop is not NULL

We have already asserted on nhg->nexthop an if statement
to flog_err makes no sense.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: Prevent use after free from pim_mlag_up_peer_deref
Donald Sharp [Thu, 5 Mar 2020 14:26:11 +0000 (09:26 -0500)]
pimd: Prevent use after free from pim_mlag_up_peer_deref

There exists a chain of events where calling pim_mlag_up_peer_deref
can free the up pointer.  Prevent a use after free by returning
the up pointer as needed and checking to make sure we are
ok.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: Remove possibility of trying to send Register when no RPF
Donald Sharp [Wed, 26 Feb 2020 14:47:28 +0000 (09:47 -0500)]
pimd: Remove possibility of trying to send Register when no RPF

On shutdown processing we may have gotten a interface down event
which might clear the rpf interface and we might trigger a
work queue item on the vxlan_sg to send a NULL register.

Ensure that we cannot attempt to do the impossible.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: When shutting down stop the vxlan worker thread
Donald Sharp [Wed, 26 Feb 2020 14:33:46 +0000 (09:33 -0500)]
pimd: When shutting down stop the vxlan worker thread

Upon shutdown stop the vxlan worker thread.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: Upon vrf deletion actually clean up memory
Donald Sharp [Wed, 26 Feb 2020 14:10:19 +0000 (09:10 -0500)]
pimd: Upon vrf deletion actually clean up memory

VRF deletion events here calling hash_clean() with
nothing to clean up the vxlan_sg's associated with it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: Add missing mlag documentation
Donald Sharp [Wed, 19 Feb 2020 17:32:30 +0000 (12:32 -0500)]
doc: Add missing mlag documentation

Add some missing mlag documentation for various commands.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: re-eval flow activity on kat expiry
Anuradha Karuppiah [Thu, 15 Aug 2019 21:00:35 +0000 (14:00 -0700)]
pimd: re-eval flow activity on kat expiry

When the (S,G) KAT expires we need to poll for activity before dropping the
entry as traffic may have been forwarded by the dataplane since the last
periodic poll cycle.

This only works if traffic is being forwarded by the kernel i.e. if the
entries were HW accelerated via an ASIC we may still miss out on last
minute activity on the mroute in the HW.

Ticket: CM-26871

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: mute termination device on the origination mroute on type mods
Anuradha Karuppiah [Tue, 15 Oct 2019 18:10:47 +0000 (11:10 -0700)]
pimd: mute termination device on the origination mroute on type mods

An mroute can transition from non-origination to a vxlan origination
mroute. In that case we need to re-evaluate if the interfaces in the
OIL need to be muted; pimreg and termination device need to be muted (if
they were previously un-muted).

Dump in a problem state:
=======================
root@TORC11:~# net show pim state
Codes: J -> Pim Join, I -> IGMP Report, S -> Source, * -> Inherited from (*,G), V -> VxLAN, M -> Muted
Active Source           Group            RPT  IIF               OIL
1      *                239.1.1.100      y    uplink-1          pimreg(I    ), ipmr-lo( J   )
1      36.0.0.11        239.1.1.100      n    peerlink-3.4094   ipmr-lo(   * ), uplink-1( J   ), uplink-2( J   ), peerlink-3.4094(  V  )

PS: ipmr-lo should have M set in (36.0.0.11,239.1.1.100)

Ticket: CM-26747

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: Allow LHR in a AA situation to join upstream
Donald Sharp [Wed, 9 Oct 2019 19:12:23 +0000 (15:12 -0400)]
pimd: Allow LHR in a AA situation to join upstream

Add a special catch to the test for pim_macro_chisin_pim_include
to allow the LHR to signal interest in joining upstream.
This will allow both the DR and non DR of the ActiveActive
situation to draw traffic to itself.

The non-DR will continue to not forward traffic.

Ticket: CM-26610
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: fix problem with oif being re-added during ifchannel del
Anuradha Karuppiah [Mon, 14 Oct 2019 23:02:36 +0000 (16:02 -0700)]
pimd: fix problem with oif being re-added during ifchannel del

Series of events leading to the problem -
1. (S,G) has been pruned on the rp on downlink-1
2. a (*,G) join is rxed on downlink-1 without the source S. This
results in the (S,G,rpt) prune state being cleared on downlink-1.
As a part of the clear the ifchannel associated with downlink-1
is deleted.
3. The ifchannel_delete handling is expected to add downlink-1
as an inherited OIF to the channel OIL (which it does). However
it is also added in as an immediate OIF (accidentally) as the
ifchannel is still present (in the process of being deleted).

To avoid the problem defer pim_upstream_update_join_desired
evaluation until after the channel is deleted.

Relevant debug logs -
PIM: pim_ifchannel_delete: ifchannel entry (27.0.0.15,239.1.1.106)(downlink-1) del start
PIM: pim_channel_add_oif(pim_ifchannel_delete): (S,G)=(27.0.0.15,239.1.1.106): proto_mask=4 OIF=downlink-1 vif_index=7: DONE
PIM: pimd/pim_oil.c pim_channel_del_oif: no existing protocol mask 2(4) for requested OIF downlink-1 (vif_index=7, min_ttl=1) for channel (S,G)=(27.0.0.15,239.1.1.106)
PIM: pim_upstream_switch: PIM_UPSTREAM_(27.0.0.15,239.1.1.106): (S,G) old: NotJoined new: Joined
PIM: pim_channel_add_oif(pim_upstream_inherited_olist_decide): (S,G)=(27.0.0.15,239.1.1.106): proto_mask=2 OIF=downlink-1 vif_index=7 added to 0x6  >>>>>>>>>>>>>>>>>>
PIM: pim_upstream_del(pim_ifchannel_delete): Delete (27.0.0.15,239.1.1.106)[default] ref count: 2 , flags: 81 c_oil ref count 1 (Pre decrement)
PIM: pim_ifchannel_delete: ifchannel entry (27.0.0.15,239.1.1.106)(downlink-1) del end

Ticket: CM-26732

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: logs to help debug leaked channel OIF problems
Anuradha Karuppiah [Mon, 14 Oct 2019 19:41:33 +0000 (12:41 -0700)]
pimd: logs to help debug leaked channel OIF problems

Additional protocols were being set on the OIF proto-mask without
logs. Added logs in that area.

Also added start and end logs to ifchannel_delete to help
identify state machine changes that play out as a part of this
event handling.

Ticket: CM-26732

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agolib, pimd, zebra: Provide some insurance against reading bad stream data
Satheesh Kumar K [Fri, 11 Oct 2019 04:33:19 +0000 (21:33 -0700)]
lib, pimd, zebra: Provide some insurance against reading bad stream data

This patch does two things:

1) Ensure the decoding of stream data between pim <-> zebra is properly
decoded and we don't read beyond the end of the stream.

2) In zebra when we are freeing memory alloced ensure that we
actually have memory to delete before we do so.

Ticket: CM-27055
Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: SO_PEERCRED is a getsockopt call
Donald Sharp [Wed, 9 Oct 2019 17:50:42 +0000 (13:50 -0400)]
zebra: SO_PEERCRED is a getsockopt call

This code is effectively dead code.  SO_PEERCRED is a getsockopt
call not *setsockopt* call.  Additionally we are not doing
anything with the failed setsockopt call at all.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: Use PIM EVPN MLAG Infra for syncing PIM MLAG Entries
Satheesh Kumar K [Mon, 19 Aug 2019 09:06:00 +0000 (02:06 -0700)]
pimd: Use PIM EVPN MLAG Infra for syncing PIM MLAG Entries

Initially, MLAG Sync is happened at pim_ifchannel, this is mainly to
support even config mismatches(missing configuration of dual active).
But this causes more syncs for each entry.

and also it is not In-line with PIM EVPN. to avoid that moving to
pm_upstream based syncing.

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
4 years agopimd: run DF election only on (*, G) termination mroutes
Anuradha Karuppiah [Wed, 10 Jul 2019 15:00:04 +0000 (08:00 -0700)]
pimd: run DF election only on (*, G) termination mroutes

(S,G) entries that inherit ipmr-lo into the OIL also inherit
the DF role from the parent (*, G) entry.

This change is done primarily to simplify the sync process and
to prevent the MLAG peers from having to track (S, G) activity etc.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agopimd: Skip nexthop lookup for register source in some cases
Donald Sharp [Fri, 22 Nov 2019 21:16:26 +0000 (16:16 -0500)]
pimd: Skip nexthop lookup for register source in some cases

There exists the possibility that a RP exists as a anycast
pair for a lan segment.  As such one side may receive
the register and properly handle the registration mechanics.
The one that does not receive the register packets will still
get S,G state and WRVIFWHOLE upcalls across the lan.  In
this case notice that we have not received the Registration
packets and prevent nexthop lookups.

Ticket: CM-27466
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: Add accidently missed code during upstreaming process
Donald Sharp [Wed, 19 Feb 2020 14:52:17 +0000 (09:52 -0500)]
pimd: Add accidently missed code during upstreaming process

There was some code missed during the upstreaming process
due to code squash.  Identify and put into a commit
to keep code consistent and correct.

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>