]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agoMerge pull request #5350 from sworleys/Fix-NS-Defualt-Info
Philippe Guibert [Thu, 26 Dec 2019 16:46:08 +0000 (17:46 +0100)]
Merge pull request #5350 from sworleys/Fix-NS-Defualt-Info

zebra: Fix default ns->info should point to default zebra_ns

4 years agoMerge pull request #5579 from donaldsharp/pim_ip_mroute_last
Jafar Al-Gharaibeh [Sun, 22 Dec 2019 18:45:40 +0000 (12:45 -0600)]
Merge pull request #5579 from donaldsharp/pim_ip_mroute_last

vtysh: Ensure interface `ip mroute ...` commands are last

4 years agoMerge pull request #5584 from qlyoung/pim-fix-iph-trust
Jafar Al-Gharaibeh [Sun, 22 Dec 2019 18:45:00 +0000 (12:45 -0600)]
Merge pull request #5584 from qlyoung/pim-fix-iph-trust

pimd: readd iph length checks

4 years agoMerge pull request #5583 from donaldsharp/multicast_nh
Jafar Al-Gharaibeh [Sun, 22 Dec 2019 18:37:37 +0000 (12:37 -0600)]
Merge pull request #5583 from donaldsharp/multicast_nh

bgpd: Allow ipv4 multicast to use v4 nexthops

4 years agoMerge pull request #5581 from Jafaral/pimroute-rf
Quentin Young [Sun, 22 Dec 2019 18:36:39 +0000 (13:36 -0500)]
Merge pull request #5581 from Jafaral/pimroute-rf

pimd: refactor ip mroute cmd

4 years agoMerge pull request #5585 from qlyoung/fix-pimd-mtrace-missing-length-check
Jafar Al-Gharaibeh [Sun, 22 Dec 2019 18:36:08 +0000 (12:36 -0600)]
Merge pull request #5585 from qlyoung/fix-pimd-mtrace-missing-length-check

pimd: fix missing igmp mtrace length check

4 years agopimd: readd iph length checks
Quentin Young [Sun, 22 Dec 2019 01:19:47 +0000 (20:19 -0500)]
pimd: readd iph length checks

Kernel might not hand us a bad packet, but better safe than sorry here.
Validate the IP header length field. Also adds an additional check that
the packet length is sufficient for an IGMP packet, and a check that we
actually have enough for an ip header at all.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5268 from qlyoung/vrrp-vrf
Donatas Abraitis [Sun, 22 Dec 2019 18:16:47 +0000 (20:16 +0200)]
Merge pull request #5268 from qlyoung/vrrp-vrf

VRRP VRF support

4 years agopimd: fix missing igmp mtrace length check
Quentin Young [Sun, 22 Dec 2019 02:02:15 +0000 (21:02 -0500)]
pimd: fix missing igmp mtrace length check

We check that the IGMP message is sufficently sized for an mtrace query,
but not a response, leading to uninitialized stack read.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: Allow ipv4 multicast to use v4 nexthops
Donald Sharp [Sat, 21 Dec 2019 01:06:56 +0000 (20:06 -0500)]
bgpd: Allow ipv4 multicast to use v4 nexthops

When passing a v4 multicast route to a peer send
the v4 nexthop as a preferred methodology.

Fixes: #5582
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: refactor ip mroute cmd
Jafar Al-Gharaibeh [Fri, 20 Dec 2019 21:30:55 +0000 (15:30 -0600)]
pimd: refactor ip mroute cmd

combine:
  ip mroute INTERFACE A.B.C.D
  ip mroute INTERFACE A.B.C.D A.B.C.D

into:
  ip mroute INTERFACE A.B.C.D [A.B.C.D]

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
4 years agoMerge pull request #5567 from opensourcerouting/bring-them-back
Mark Stapp [Fri, 20 Dec 2019 19:05:07 +0000 (14:05 -0500)]
Merge pull request #5567 from opensourcerouting/bring-them-back

lib: fix build of the northbound plugins

4 years agoMerge pull request #5563 from mjstapp/fix_nhg_depends_find
Quentin Young [Fri, 20 Dec 2019 18:06:29 +0000 (13:06 -0500)]
Merge pull request #5563 from mjstapp/fix_nhg_depends_find

zebra: improve efficiency of depends_find()

4 years agovtysh: Ensure interface `ip mroute ...` commands are last
Donald Sharp [Fri, 20 Dec 2019 14:47:30 +0000 (09:47 -0500)]
vtysh: Ensure interface `ip mroute ...` commands are last

Ensure when displaying interface based ip mroute commands that they
are last.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5574 from ton31337/fix/no_bgp_listen_range_peer-group
Donald Sharp [Fri, 20 Dec 2019 13:28:41 +0000 (08:28 -0500)]
Merge pull request #5574 from ton31337/fix/no_bgp_listen_range_peer-group

bgpd: Make sure we can use `no bgp listen range ...`

4 years agobgpd: Make sure we can use `no bgp listen range ...`
Donatas Abraitis [Thu, 19 Dec 2019 20:09:47 +0000 (22:09 +0200)]
bgpd: Make sure we can use `no bgp listen range ...`

Fixes:
```
exit1-debian-9(config-router)# no bgp listen range 192.168.10.0/24 peer-group TEST
% Peer-group does not exist
exit1-debian-9(config-router)#
```
Closes https://github.com/FRRouting/frr/issues/5570

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agolib: fix build of the northbound plugins
Renato Westphal [Thu, 19 Dec 2019 15:44:37 +0000 (12:44 -0300)]
lib: fix build of the northbound plugins

Commit 1b3e9a21dd4 removed the global visibility of the yang_modules
variable, breaking the build of all northbound plugins. Revert a
small part of that commit to fix this issue.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #5566 from ton31337/fix/ebgp-requires-policy_with_ibgp
Donald Sharp [Thu, 19 Dec 2019 14:55:19 +0000 (09:55 -0500)]
Merge pull request #5566 from ton31337/fix/ebgp-requires-policy_with_ibgp

 bgpd: Do not apply eBGP policy for iBGP peers

4 years agoMerge pull request #5543 from Jafaral/routerid
Donatas Abraitis [Thu, 19 Dec 2019 09:26:18 +0000 (11:26 +0200)]
Merge pull request #5543 from Jafaral/routerid

zebra: add 'show router-id'

4 years agotests: Test if eBGP policy is not applied to iBGP peers
Donatas Abraitis [Thu, 19 Dec 2019 08:53:05 +0000 (10:53 +0200)]
tests: Test if eBGP policy is not applied to iBGP peers

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Do not apply eBGP policy for iBGP peers
Donatas Abraitis [Thu, 19 Dec 2019 08:51:13 +0000 (10:51 +0200)]
bgpd: Do not apply eBGP policy for iBGP peers

Treat iBGP peers as they have a policy applied.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5549 from donaldsharp/automated
Donatas Abraitis [Thu, 19 Dec 2019 08:09:39 +0000 (10:09 +0200)]
Merge pull request #5549 from donaldsharp/automated

doc: Update workflow to include new automated testing Requirement

4 years agoMerge pull request #5561 from qlyoung/doc-update-overview
Donatas Abraitis [Thu, 19 Dec 2019 08:09:23 +0000 (10:09 +0200)]
Merge pull request #5561 from qlyoung/doc-update-overview

Doc update overview

4 years agoMerge pull request #5564 from taspelund/end-of-rib_notification
Sri Mohana Singamsetty [Thu, 19 Dec 2019 05:13:49 +0000 (21:13 -0800)]
Merge pull request #5564 from taspelund/end-of-rib_notification

bgpd: Remove misleading 'NOTIFICATION' string from End-of-RIB log

4 years agovrrpd: support namespace vrf too
Quentin Young [Wed, 18 Dec 2019 21:01:44 +0000 (16:01 -0500)]
vrrpd: support namespace vrf too

-.-

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: Remove misleading 'NOTIFICATION' string from End-of-RIB log
Trey Aspelund [Wed, 18 Dec 2019 20:58:26 +0000 (15:58 -0500)]
bgpd: Remove misleading 'NOTIFICATION' string from End-of-RIB log

'NOTIFICATION' string in this message incorrectly implies a BGP
Notification message was the cause of this log. Removing it to
reduce confusion and replacing with function name.

Signed-off-by: Trey Aspelund <taspelund@cumulusnetworks.com>
4 years agolib: document vrf_socket(), vrf_bind()
Quentin Young [Wed, 18 Dec 2019 20:58:08 +0000 (15:58 -0500)]
lib: document vrf_socket(), vrf_bind()

These two don't really do what you might expect, document them

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agozebra: improve efficiency of depends_find()
Mark Stapp [Wed, 18 Dec 2019 20:34:37 +0000 (15:34 -0500)]
zebra: improve efficiency of depends_find()

Do less malloc and free in depends_find(), when looking for
a singleton nexthop in the nhg hash.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: fix duplicate -S option in bgpd manpage
Quentin Young [Wed, 18 Dec 2019 19:14:36 +0000 (14:14 -0500)]
doc: fix duplicate -S option in bgpd manpage

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agodoc: update overview.rst for the new millennium
Quentin Young [Wed, 18 Dec 2019 19:09:31 +0000 (14:09 -0500)]
doc: update overview.rst for the new millennium

Provide a more succinct summary of what FRR is, what it does, where it
sits in the network stack. Also remove some outdated comments about
features.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5559 from mjstapp/fix_test_typelist
Quentin Young [Wed, 18 Dec 2019 19:20:25 +0000 (14:20 -0500)]
Merge pull request #5559 from mjstapp/fix_test_typelist

tests: fix endian bug in test_typelist

4 years agoMerge pull request #5556 from donaldsharp/ospf_use_after
Mark Stapp [Wed, 18 Dec 2019 18:44:04 +0000 (13:44 -0500)]
Merge pull request #5556 from donaldsharp/ospf_use_after

ospfd: Prevent use after free on shutdown

4 years agotests: fix endian bug in test_typelist
Mark Stapp [Wed, 18 Dec 2019 15:52:08 +0000 (10:52 -0500)]
tests: fix endian bug in test_typelist

Fix a byte-swapping bug that appeared on big-endian arch but
wasn't visible on little-endian runs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoospfd: Prevent use after free on shutdown
Donald Sharp [Wed, 18 Dec 2019 14:23:38 +0000 (09:23 -0500)]
ospfd: Prevent use after free on shutdown

Address Sanitizer is reporting this issue:

==26177==ERROR: AddressSanitizer: heap-use-after-free on address 0x6120000238d8 at pc 0x7f88f7c4fa93 bp 0x7fff9a641830 sp 0x7fff9a641820
READ of size 8 at 0x6120000238d8 thread T0
    #0 0x7f88f7c4fa92 in if_delete lib/if.c:290
    #1 0x42192e in ospf_vl_if_delete ospfd/ospf_interface.c:912
    #2 0x42192e in ospf_vl_delete ospfd/ospf_interface.c:990
    #3 0x4a6208 in no_ospf_area_vlink ospfd/ospf_vty.c:1227
    #4 0x7f88f7c1553d in cmd_execute_command_real lib/command.c:1073
    #5 0x7f88f7c19b1e in cmd_execute_command lib/command.c:1132
    #6 0x7f88f7c19e8e in cmd_execute lib/command.c:1288
    #7 0x7f88f7cd7523 in vty_command lib/vty.c:516
    #8 0x7f88f7cd79ff in vty_execute lib/vty.c:1285
    #9 0x7f88f7cde4f9 in vtysh_read lib/vty.c:2119
    #10 0x7f88f7ccb845 in thread_call lib/thread.c:1549
    #11 0x7f88f7c5d6a7 in frr_run lib/libfrr.c:1093
    #12 0x412976 in main ospfd/ospf_main.c:221
    #13 0x7f88f73b082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #14 0x413c78 in _start (/usr/local/master/sbin/ospfd+0x413c78)

Effectively we are in a shutdown phase and as part of shutdown we delete the
ospf interface pointer ( ifp->info ).  The interface deletion code
was modified in the past year to pass in the address of operator
to allow us to NULL out the holding pointer.  The catch here
is that we free the oi and then delete the interface passing
in the address of the oi->ifp pointer, causing a use after free.

Fixes: #5555
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5552 from sworleys/NHG-Set-RTNH_F_ONLINK
Donatas Abraitis [Wed, 18 Dec 2019 06:06:31 +0000 (08:06 +0200)]
Merge pull request #5552 from sworleys/NHG-Set-RTNH_F_ONLINK

zebra: set RTNH_F_ONLINK in nexthop creation

4 years agozebra: add 'show router-id'
Jafar Al-Gharaibeh [Tue, 17 Dec 2019 06:02:12 +0000 (00:02 -0600)]
zebra: add 'show router-id'

router-id is buried deep in "show running-config", this new
command makes it easy to retrieve the user configured router-id.
Example:

  # configure terminal
  (config)# router-id 1.2.3.4
  (config)# end

  # show router-id
  router-id 1.2.3.4

  # configure terminal
  (config)# no router-id 1.2.3.4
  (config)# end

  # show router-id
  #

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
4 years agoMerge pull request #5514 from Jafaral/nhrp-docs
Quentin Young [Tue, 17 Dec 2019 20:17:35 +0000 (15:17 -0500)]
Merge pull request #5514 from Jafaral/nhrp-docs

doc: add discussion for a handful of nhrp commands

4 years agodoc: Update workflow to include new automated testing Requirement
Donald Sharp [Tue, 17 Dec 2019 15:32:37 +0000 (10:32 -0500)]
doc: Update workflow to include new automated testing Requirement

Update the workflow.rst file to outline new requirement for
features to include automated testing of some sort.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: set RTNH_F_ONLINK in nexthop creation
Stephen Worley [Tue, 17 Dec 2019 19:24:22 +0000 (14:24 -0500)]
zebra: set RTNH_F_ONLINK in nexthop creation

We were not setting the RTNH_F_ONLINK flag where appropriate
when creating nexthop objects in the kernel.

Set it on the nhmsg.nh_flags netlink message.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agodoc: add discussion for a handful of nhrp commands
Jafar Al-Gharaibeh [Tue, 17 Dec 2019 17:03:09 +0000 (11:03 -0600)]
doc: add discussion for a handful of nhrp commands

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
4 years agoMerge pull request #5548 from mjstapp/vty_nhg_alias
Quentin Young [Tue, 17 Dec 2019 16:18:55 +0000 (11:18 -0500)]
Merge pull request #5548 from mjstapp/vty_nhg_alias

vtysh: add an alias for the nexthop-group config targets

4 years agoMerge pull request #5508 from ton31337/feature/show_ip_route_summary_json
Quentin Young [Tue, 17 Dec 2019 15:05:13 +0000 (10:05 -0500)]
Merge pull request #5508 from ton31337/feature/show_ip_route_summary_json

zebra: Print json output for show_route_summary_cmd

4 years agovtysh: add an alias for the nexthop-group config targets
Mark Stapp [Tue, 17 Dec 2019 14:56:26 +0000 (09:56 -0500)]
vtysh: add an alias for the nexthop-group config targets

Use an alias for the daemons who process the nexthop-group
config cli; makes it easier to expand that list in the future.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #5541 from sworleys/NHG-Fixes
Russ White [Tue, 17 Dec 2019 13:30:37 +0000 (08:30 -0500)]
Merge pull request #5541 from sworleys/NHG-Fixes

zebra: a couple nhg fixes

4 years agoMerge pull request #5540 from sworleys/NH-Defualt-Weight-One
Russ White [Tue, 17 Dec 2019 13:29:46 +0000 (08:29 -0500)]
Merge pull request #5540 from sworleys/NH-Defualt-Weight-One

lib: default nexthop weights to one

4 years agozebra: pass type when finding individual nexthop
Stephen Worley [Mon, 16 Dec 2019 21:46:30 +0000 (16:46 -0500)]
zebra: pass type when finding individual nexthop

When we are doing a lookup on an individual nexthop,
we should still be passing along the type that gets passed
via the arguments. Otherwise, we will always think we own that
NHE when in reality anyone could have put that into the
kernel.

Before this patch, nexthops in the kernel will get swepped
out even if we didn't create them.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agozebra: null check re->nhe not re->nhe->nhg on attach
Stephen Worley [Mon, 16 Dec 2019 21:37:14 +0000 (16:37 -0500)]
zebra: null check re->nhe not re->nhe->nhg on attach

We should be NULL checking the entire re->nhe struct, not
the group inside of it. When we get routes from the kernel
using a nexthop group (and future protocols) they will only
pass us an ID to use. Hence, this struct can (and will be)
NULL on first attach when only passed an ID.

There shouldn't be a situation where we have an re->nhe
and don't have an re->nhe->nhg anyway.

Before this patch you can easily make zebra crash by creating a
route in the kernel using a nexthop group and starting zebra.

`ip next add dev lo id 111`
`ip route add 1.1.1.1/32 nhid 111`

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agolib: default nexthop weights to one
Stephen Worley [Mon, 16 Dec 2019 20:42:37 +0000 (15:42 -0500)]
lib: default nexthop weights to one

Default all nexthop weights to one. The linux kernel does
some weird stuff where it adds one to all nexthop weight values
it gets. So, we added df7fb5800b3798057747873c8be245eb13f3ec36 with
some special subtracing/adding to account for this. Though, that patch
did not account for the default case of the weight being zero for
elements in the group.

Hence, this patch defaults the nexthop weight to one during creation.
This should be a valid value on all platforms anyway so shouldn't
affect anything.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agoMerge pull request #5502 from ton31337/fix/rr_do_not_show_fqdn
Sri Mohana Singamsetty [Mon, 16 Dec 2019 17:43:01 +0000 (09:43 -0800)]
Merge pull request #5502 from ton31337/fix/rr_do_not_show_fqdn

bgpd: Show `ip` and `fqdn` in json output for `show [ip] bgp json`

4 years agoMerge pull request #5379 from pogojotz/fix-bgp-neighbors-prefix-count-segfault
Sri Mohana Singamsetty [Mon, 16 Dec 2019 17:41:35 +0000 (09:41 -0800)]
Merge pull request #5379 from pogojotz/fix-bgp-neighbors-prefix-count-segfault

bgpd: Special handling for 2-level routing tables

4 years agoMerge pull request #5427 from liam-mcb/igmp-join-any
Donald Sharp [Mon, 16 Dec 2019 12:47:41 +0000 (07:47 -0500)]
Merge pull request #5427 from liam-mcb/igmp-join-any

pimd: Add command to join any-source multicast.

4 years agoMerge pull request #5523 from donaldsharp/mlag_single_compile
David Lamparter [Mon, 16 Dec 2019 12:45:36 +0000 (13:45 +0100)]
Merge pull request #5523 from donaldsharp/mlag_single_compile

mlag compile issue fixups

4 years agoMerge pull request #5535 from opensourcerouting/santa-elf
Donald Sharp [Mon, 16 Dec 2019 12:42:47 +0000 (07:42 -0500)]
Merge pull request #5535 from opensourcerouting/santa-elf

*: cleanup elves were here

4 years agozebra: Do not build mlag protobuf support if version 3 is not avail
Donald Sharp [Tue, 10 Dec 2019 19:06:33 +0000 (14:06 -0500)]
zebra: Do not build mlag protobuf support if version 3 is not avail

Older versions of protobuf-c do not support version 3 of the
protocol.  Add a check into the system to see if we have
version 3 available and if so, compile it in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: Allow zebra_mlag to compile with no j factor
Donald Sharp [Tue, 10 Dec 2019 01:48:21 +0000 (20:48 -0500)]
zebra: Allow zebra_mlag to compile with no j factor

If you compile FRR with no j factor zebra_mlag.c fails to
build because the vtysh extraction methodology runs first
before the protobuf compiler runs and that compilation does
not have the proper dependancy chain built for the inclusions
that zebra_mlag.c had.  Moving the DEF* code into a zebra_mlag_vty.c
which can be included in the vtysh extraction code and has
no mlag.proto dependancies makes the compilation work better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotools: symalyzer
David Lamparter [Wed, 27 Nov 2019 22:19:10 +0000 (23:19 +0100)]
tools: symalyzer

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/linklist: flip the bitrot compost
David Lamparter [Wed, 27 Nov 2019 21:52:50 +0000 (22:52 +0100)]
lib/linklist: flip the bitrot compost

The whole lib/linklist.c code shouldn't really be used for new code (the
lib/typesafe.h bits are better.)  So, a new need for these unused
functions shouldn't be coming up.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: random unused bits cleanup
David Lamparter [Wed, 27 Nov 2019 20:49:00 +0000 (21:49 +0100)]
lib: random unused bits cleanup

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/prefix: flip the bitrot compost
David Lamparter [Wed, 27 Nov 2019 20:43:27 +0000 (21:43 +0100)]
lib/prefix: flip the bitrot compost

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #5452 from mjstapp/fix_notify_nhg
Donald Sharp [Fri, 13 Dec 2019 19:11:34 +0000 (14:11 -0500)]
Merge pull request #5452 from mjstapp/fix_notify_nhg

zebra: align dplane notify processing with nhg work

4 years agolib: make some variables static
David Lamparter [Wed, 27 Nov 2019 20:17:57 +0000 (21:17 +0100)]
lib: make some variables static

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: completely get rid of the MTYPE alias hack
David Lamparter [Wed, 13 Nov 2019 23:21:10 +0000 (00:21 +0100)]
lib: completely get rid of the MTYPE alias hack

Sometimes the easiest solution is hardest to find... the whole point of
all this "static const", aliasing, & co. was to make "MTYPE_FOO" usable
without adding the extra & as in "&MTYPE_FOO".  Making it a size-1 array
does that perfectly through the magic of ISO C array decay...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: make rcu_free() NULL-safe
David Lamparter [Wed, 13 Nov 2019 14:42:32 +0000 (15:42 +0100)]
lib: make rcu_free() NULL-safe

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobgpd: remove redundant VNC build specs
David Lamparter [Wed, 27 Nov 2019 18:05:35 +0000 (19:05 +0100)]
bgpd: remove redundant VNC build specs

rfapi_descriptor_rfp_utils.c is already built into libbgp.a and these
include paths have no effect at all.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #5532 from donaldsharp/leaks
Jafar Al-Gharaibeh [Fri, 13 Dec 2019 04:47:45 +0000 (22:47 -0600)]
Merge pull request #5532 from donaldsharp/leaks

Leaks

4 years agoisisd: Free memory when confused
Donald Sharp [Fri, 13 Dec 2019 00:30:21 +0000 (19:30 -0500)]
isisd: Free memory when confused

When you call into lsp_update with confusion, the lsp is purged
and we do not do anything with the created tlv's from parsing
the incoming data.  To prevent the tlv's from being leaked
note confusion and delete the unneeded data.

Fixes: #5496
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoripd, ripngd: Free up list after call into nb_cli_rpc
Donald Sharp [Thu, 12 Dec 2019 23:48:04 +0000 (18:48 -0500)]
ripd, ripngd: Free up list after call into nb_cli_rpc

We have a clear memory leak after running `clear ip rip`
Fix this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5531 from qlyoung/fix-ospf-ip-hl-trust
Jafar Al-Gharaibeh [Thu, 12 Dec 2019 19:19:36 +0000 (13:19 -0600)]
Merge pull request #5531 from qlyoung/fix-ospf-ip-hl-trust

Fix ospf ip hl trust

4 years agozebra: handle route notification with no nexthops
Mark Stapp [Thu, 12 Dec 2019 14:53:55 +0000 (09:53 -0500)]
zebra: handle route notification with no nexthops

Handle the special case where a route update contains
no installed nexthops - that means the route is not
installed.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: Print json output for show_route_summary_cmd
Donatas Abraitis [Mon, 9 Dec 2019 07:33:48 +0000 (09:33 +0200)]
zebra: Print json output for show_route_summary_cmd

```
spine1-debian-9# sh ip route summary json
{
  "routes":[
    {
      "fib":1,
      "rib":1,
      "type":"kernel"
    },
    {
      "fib":11,
      "rib":11,
      "type":"connected"
    },
    {
      "fib":2,
      "rib":2,
      "type":"ebgp"
    },
    {
      "fib":1,
      "rib":1,
      "type":"ibgp"
    }
  ],
  "routesTotal":15,
  "routesTotalFib":15
}
spine1-debian-9# sh ipv6 route summary json
{
  "routes":[
    {
      "fib":7,
      "rib":7,
      "type":"connected"
    }
  ],
  "routesTotal":7,
  "routesTotalFib":7
}
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agopimd: Add command to join any-source multicast.
Liam McBirnie [Thu, 5 Dec 2019 20:57:50 +0000 (21:57 +0100)]
pimd: Add command to join any-source multicast.

Allow 'ip igmp join' to join group for any source if no source is
specified.
Disallow joining source "0.0.0.0" as it is used to define an
any-source multicast group.

Signed-off-by: Liam McBirnie <liam.mcbirnie@boeing.com>
4 years agotests: Test if `ip` and `fqdn` are included in `show [ip] bgp json`
Donatas Abraitis [Fri, 6 Dec 2019 20:44:36 +0000 (22:44 +0200)]
tests: Test if `ip` and `fqdn` are included in `show [ip] bgp json`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Show `ip` and `fqdn` in json output for `show [ip] bgp <route> json`
Donatas Abraitis [Fri, 6 Dec 2019 20:03:50 +0000 (22:03 +0200)]
bgpd: Show `ip` and `fqdn` in json output for `show [ip] bgp <route> json`

This should keep backward compatibility when bgp show-hostname is
enabled/disabled.

Also show the real originator IP instead of showing fqdn of the route
reflector.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoospfd: tiny style fix
Quentin Young [Thu, 12 Dec 2019 05:15:25 +0000 (00:15 -0500)]
ospfd: tiny style fix

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoospfd: sizeof(pointer) -> sizeof(pointed-at)
Quentin Young [Thu, 12 Dec 2019 05:13:58 +0000 (00:13 -0500)]
ospfd: sizeof(pointer) -> sizeof(pointed-at)

14 years old eh?

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoospfd: fix misplaced trust in ip header length
Quentin Young [Thu, 12 Dec 2019 05:09:39 +0000 (00:09 -0500)]
ospfd: fix misplaced trust in ip header length

We actually don't validate the IHL field, although it certainly looks
like we do at a casual glance.

This patch saves us from an assert in case we actually do get an IP
packet with an incorrect header length field.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #5528 from opensourcerouting/bmp-dns-fixing
Donald Sharp [Wed, 11 Dec 2019 18:22:34 +0000 (13:22 -0500)]
Merge pull request #5528 from opensourcerouting/bmp-dns-fixing

BMP: improve active outbound connection details

4 years agobgpd: Allow failed hostname lookup to continue in bmp (#5399)
David Lamparter [Wed, 11 Dec 2019 18:21:18 +0000 (19:21 +0100)]
bgpd: Allow failed hostname lookup to continue in bmp (#5399)

bgpd: Allow failed hostname lookup to continue in bmp

4 years agoMerge pull request #5494 from opensourcerouting/mlag-module
Donald Sharp [Wed, 11 Dec 2019 18:14:02 +0000 (13:14 -0500)]
Merge pull request #5494 from opensourcerouting/mlag-module

zebra: create zebra_cumulus_mlag module

4 years agozebra: accept async notification for un-install
Mark Stapp [Wed, 11 Dec 2019 16:22:53 +0000 (11:22 -0500)]
zebra: accept async notification for un-install

Handle an async notification when a route-update operation
uninstalls one route in favor of another.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #5497 from donaldsharp/unequality_ecmp
Mark Stapp [Wed, 11 Dec 2019 16:02:15 +0000 (11:02 -0500)]
Merge pull request #5497 from donaldsharp/unequality_ecmp

Unequality ecmp

4 years agoMerge pull request #5527 from opensourcerouting/skiplist-uninit-warning
Mark Stapp [Wed, 11 Dec 2019 14:03:08 +0000 (09:03 -0500)]
Merge pull request #5527 from opensourcerouting/skiplist-uninit-warning

lib/skiplist: fix gcc-9 used-uninitialized warning

4 years agobgpd/bmp: print active outbound connections
David Lamparter [Wed, 11 Dec 2019 12:35:16 +0000 (13:35 +0100)]
bgpd/bmp: print active outbound connections

... including timer & details about current state and last failure.

Fixes: #5401
Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib,nhrpd,bgpd/bmp: pass resolver failure details
David Lamparter [Wed, 11 Dec 2019 12:33:36 +0000 (13:33 +0100)]
lib,nhrpd,bgpd/bmp: pass resolver failure details

To keep the calling code agnostic of the DNS resolver libary used, pass
a strerror-style string instead of a status code that would need extra
handling.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobgpd/bmp: actually print uptime
David Lamparter [Wed, 11 Dec 2019 11:34:56 +0000 (12:34 +0100)]
bgpd/bmp: actually print uptime

Forgot to replace the stub here when finishing up...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/resolver: support/bypass IP literals
David Lamparter [Wed, 11 Dec 2019 11:27:05 +0000 (12:27 +0100)]
lib/resolver: support/bypass IP literals

libc-ares doesn't do IP literals, so we have to do that before running
off to do DNS.  Since this isn't BMP specific, move to lib/ so NHRP can
benefit too.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/skiplist: fix gcc-9 used-uninitialized warning
David Lamparter [Tue, 10 Dec 2019 16:22:49 +0000 (17:22 +0100)]
lib/skiplist: fix gcc-9 used-uninitialized warning

Under some circumstances (apparently depends on several optimization
flags), gcc-9 throws an used-uninitialized warning for this variable in
the skiplist code.  Just initialize to NULL.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agozebra: fix sign-compare warning in cumulus mlag
David Lamparter [Wed, 11 Dec 2019 10:41:54 +0000 (11:41 +0100)]
zebra: fix sign-compare warning in cumulus mlag

This trips up the CI on Ubuntu 16.04.  (I guess the code wasn't getting
built there before...)

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agozebra: create zebra_cumulus_mlag module
David Lamparter [Wed, 4 Dec 2019 03:18:12 +0000 (04:18 +0100)]
zebra: create zebra_cumulus_mlag module

This is pretty much just to get rid of the HAVE_CUMULUS.  The
hook/module API is as "wtf" as it was before...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #5517 from mjstapp/fix_evpn_state
Donald Sharp [Tue, 10 Dec 2019 22:14:34 +0000 (17:14 -0500)]
Merge pull request #5517 from mjstapp/fix_evpn_state

zebra: use correct state when installing evpn macs

4 years agoMerge pull request #5521 from mjstapp/fix_pim_upstream_sa
Donald Sharp [Tue, 10 Dec 2019 22:14:03 +0000 (17:14 -0500)]
Merge pull request #5521 from mjstapp/fix_pim_upstream_sa

pimd: clear SA warning in pimd

4 years agopimd: clear SA warning in pimd
Mark Stapp [Tue, 10 Dec 2019 17:10:44 +0000 (12:10 -0500)]
pimd: clear SA warning in pimd

Remove a dead store in pim_upstream.c to clear up an SA
warning.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoFix bgp transit double free (#5436)
David Lamparter [Tue, 10 Dec 2019 16:56:57 +0000 (17:56 +0100)]
Fix bgp transit double free (#5436)

Fix bgp transit double free

4 years agoMerge pull request #5511 from Jafaral/ipmroute
Russ White [Tue, 10 Dec 2019 13:55:57 +0000 (08:55 -0500)]
Merge pull request #5511 from Jafaral/ipmroute

doc: document ip mroute static route cmd

4 years agoMerge pull request #5513 from m-varasteh/fix-running-entry-in-vrf-change
Renato Westphal [Tue, 10 Dec 2019 13:03:01 +0000 (10:03 -0300)]
Merge pull request #5513 from m-varasteh/fix-running-entry-in-vrf-change

lib: fixes invalid running_entry when VRF is changed

4 years agoMerge pull request #5429 from Spantik/bug_fix
Donatas Abraitis [Tue, 10 Dec 2019 07:43:28 +0000 (09:43 +0200)]
Merge pull request #5429 from Spantik/bug_fix

BGP: BGP assert when it tries to access peer which is closed.

4 years agolib: fixes invalid running_entry when VRF is changed
Mahdi Varasteh [Tue, 10 Dec 2019 05:05:17 +0000 (08:35 +0330)]
lib: fixes invalid running_entry when VRF is changed

we just unset the entry from old node and add it to the new one

Signed-off-by: Mahdi Varasteh <mahdy.varasteh@gmail.com>
4 years agodoc: document ip mroute static route cmd
Jafar Al-Gharaibeh [Mon, 9 Dec 2019 22:55:14 +0000 (16:55 -0600)]
doc: document ip mroute static route cmd

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
4 years agoMerge pull request #5509 from manuhalo/fix_isis_circ_del
Renato Westphal [Mon, 9 Dec 2019 21:34:49 +0000 (18:34 -0300)]
Merge pull request #5509 from manuhalo/fix_isis_circ_del

isisd: clean ipv4/6 circuit config on destroy

4 years agolib,zebra: add api to enforce nexthop sort order when copying
Mark Stapp [Mon, 9 Dec 2019 21:02:57 +0000 (16:02 -0500)]
lib,zebra: add api to enforce nexthop sort order when copying

Add an api that creates a copy of a list of nexthops and
enforces the canonical sort ordering; consolidate some nhg
code to avoid copy-and-paste. The zebra dplane uses
that api when a plugin sets up a list of nexthops, ensuring
that the plugin's list is ordered when it's processed in
zebra.

Signed-off-by: Mark Stapp <mjs@voltanet.io>