]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
5 years agozebra: don't treat every interface as unnumbered 6103/head
Mark Stapp [Fri, 6 Mar 2020 21:09:10 +0000 (16:09 -0500)]
zebra: don't treat every interface as unnumbered

Commit e93a6fbb4 from PR3908 changed every interface into an
'unnumbered' interface - even interfaces that do not have
ipv4 at all. Undo that.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #6299 from ton31337/fix/access-list_deletion
Donald Sharp [Wed, 29 Apr 2020 12:31:31 +0000 (08:31 -0400)]
Merge pull request #6299 from ton31337/fix/access-list_deletion

lib: Delete the entire access-list only if there are no more entries

5 years agoMerge pull request #6228 from donaldsharp/change_network_statement_default
David Lamparter [Wed, 29 Apr 2020 07:02:42 +0000 (09:02 +0200)]
Merge pull request #6228 from donaldsharp/change_network_statement_default

5 years agoMerge pull request #6310 from donaldsharp/revert_the_behavior
Sri Mohana Singamsetty [Tue, 28 Apr 2020 22:41:47 +0000 (15:41 -0700)]
Merge pull request #6310 from donaldsharp/revert_the_behavior

Revert "vtysh: fix searching commands in parent nodes"

5 years agodoc: Update doc for the `bgp network import-check` command 6228/head
Donald Sharp [Wed, 15 Apr 2020 12:31:27 +0000 (08:31 -0400)]
doc: Update doc for the `bgp network import-check` command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd,tests: Modify import-check to require underlying prefixes to exist
Donald Sharp [Wed, 15 Apr 2020 12:21:11 +0000 (08:21 -0400)]
bgpd,tests: Modify import-check to require underlying prefixes to exist

Modify the import-check command to require the underlying prefix
to exist in the rib.  General consensus is that this is the correct
behavior.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #6302 from volta-networks/fix_ldpd_af_reload
Donald Sharp [Tue, 28 Apr 2020 19:05:57 +0000 (15:05 -0400)]
Merge pull request #6302 from volta-networks/fix_ldpd_af_reload

tools: fix frr-reload AF issue with ldpd

5 years agoMerge pull request #6295 from ton31337/feature/show_bgp_afi_safi_sntpfx
Lou Berger [Tue, 28 Apr 2020 15:34:13 +0000 (11:34 -0400)]
Merge pull request #6295 from ton31337/feature/show_bgp_afi_safi_sntpfx

bgpd: Show PfxSnt for `show bgp <afi> <safi>` command

5 years agoMerge pull request #6308 from donaldsharp/pim_ordering
David Lamparter [Tue, 28 Apr 2020 15:14:28 +0000 (17:14 +0200)]
Merge pull request #6308 from donaldsharp/pim_ordering

5 years agoRevert "vtysh: fix searching commands in parent nodes" 6310/head
Donald Sharp [Tue, 28 Apr 2020 14:46:22 +0000 (10:46 -0400)]
Revert "vtysh: fix searching commands in parent nodes"

This reverts commit d741915ecdcf8930ccb3bd23eec1da2f0d000483.

This is because it breaks this behavior:

router ospf6
  <commands>
!
int enp39s0
  <more commands>
!

This is a very legal set of commands and completely destroys the
ability to do this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #6306 from opensourcerouting/triple-wtf-20200428
Donald Sharp [Tue, 28 Apr 2020 12:00:28 +0000 (08:00 -0400)]
Merge pull request #6306 from opensourcerouting/triple-wtf-20200428

*: triple pack of one-liner WTF fixes

5 years agopimd: Add a needed space for formatting 6308/head
Donald Sharp [Tue, 28 Apr 2020 11:59:18 +0000 (07:59 -0400)]
pimd: Add a needed space for formatting

Display a space in the output.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: don't split format string from zlog call 6306/head
David Lamparter [Tue, 28 Apr 2020 09:09:26 +0000 (11:09 +0200)]
pimd: don't split format string from zlog call

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agotests: fix size confusion
David Lamparter [Thu, 23 Apr 2020 21:54:05 +0000 (23:54 +0200)]
tests: fix size confusion

The question here isn't "why does it break on PowerPC?", but rather "why
doesn't it break on x86_64 or ARM?"

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobgpd: fix typo
David Lamparter [Tue, 28 Apr 2020 09:07:01 +0000 (11:07 +0200)]
bgpd: fix typo

o.O

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agoMerge pull request #6301 from pguibert6WIND/bfd_debug_show
Rafael Zalamena [Mon, 27 Apr 2020 18:12:07 +0000 (15:12 -0300)]
Merge pull request #6301 from pguibert6WIND/bfd_debug_show

bfdd: display debugging status of bfd

5 years agobfdd: display debugging status of bfd 6301/head
Philippe Guibert [Mon, 27 Apr 2020 15:21:45 +0000 (17:21 +0200)]
bfdd: display debugging status of bfd

display debugging status of bfd.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agotools: fix frr-reload AF issue with ldpd 6302/head
Emanuele Di Pascale [Mon, 27 Apr 2020 13:47:03 +0000 (15:47 +0200)]
tools: fix frr-reload AF issue with ldpd

when removing a whole address-family block from ldpd config
we were erroneously trying to also remove each of the interface
sub-sub-contexts that belonged to it; this would effectively
re-enable the AF we just removed. Work around this by ignoring
these sub-sub-contexts if we detect that we are already
removing the parent block.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agoMerge pull request #6298 from opensourcerouting/build-assorted-20200423
Donald Sharp [Mon, 27 Apr 2020 13:06:19 +0000 (09:06 -0400)]
Merge pull request #6298 from opensourcerouting/build-assorted-20200423

build: spring cleaning

5 years agolib: Delete the entire access-list only if there are no more entries 6299/head
Donatas Abraitis [Mon, 27 Apr 2020 09:13:48 +0000 (12:13 +0300)]
lib: Delete the entire access-list only if there are no more entries

When you enter the access-list with the same sequence number but with a
different prefix AND access-list has only a single entry, then the entry
is deleted and the whole access-list is deleted.

That means that "replace entry" never be re-inserted.

With fix:
```
~# vtysh -c 'c' -c 'access-list 1 seq 10 permit 127.0.0.10/32'
~# vtysh -c 'sh run' | grep access-list
access-list 1 seq 10 permit 127.0.0.10/32
~# vtysh -c 'c' -c 'access-list 1 seq 10 permit 127.0.0.20/32'
~# vtysh -c 'sh run' | grep access-list
access-list 1 seq 10 permit 127.0.0.20/32
~# vtysh -c 'c' -c 'access-list 1 seq 11 permit 127.0.0.11/32'
~# vtysh -c 'sh run' | grep access-list
access-list 1 seq 10 permit 127.0.0.20/32
access-list 1 seq 11 permit 127.0.0.11/32
~# vtysh -c 'c' -c 'no access-list 1 seq 10 permit 127.0.0.20/32'
~# vtysh -c 'sh run' | grep access-list
access-list 1 seq 11 permit 127.0.0.11/32
~#
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agolib: Convert access_list_empty to bool
Donatas Abraitis [Mon, 27 Apr 2020 09:13:04 +0000 (12:13 +0300)]
lib: Convert access_list_empty to bool

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobuild: silence idiotic libtool warnings 6298/head
David Lamparter [Wed, 15 Apr 2020 14:03:42 +0000 (16:03 +0200)]
build: silence idiotic libtool warnings

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobuild: move python 2.x to the very last preference
David Lamparter [Thu, 23 Apr 2020 18:41:04 +0000 (20:41 +0200)]
build: move python 2.x to the very last preference

Also try explicit 3.9 & 3.10.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobfdd: fix frr-format false warning
David Lamparter [Thu, 23 Apr 2020 18:34:16 +0000 (20:34 +0200)]
bfdd: fix frr-format false warning

Dealing with PRIu64 is unfortunately a bit hacky in the frr-format
plugin, as in, it works correctly with snprintfrr, but breaks on plain
snprintf.  There's no good solution unfortunately :/.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agolib/zlog: fix printfrr format attribute
David Lamparter [Thu, 23 Apr 2020 18:17:18 +0000 (20:17 +0200)]
lib/zlog: fix printfrr format attribute

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years ago*: fix first header
David Lamparter [Thu, 23 Apr 2020 18:16:37 +0000 (20:16 +0200)]
*: fix first header

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agopython: add check-first-header tool
David Lamparter [Thu, 23 Apr 2020 18:14:58 +0000 (20:14 +0200)]
python: add check-first-header tool

The first #include statement in all FRR .c files should be either
zebra.h or config.h.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobuild: make clippy Makefile rules nicer
David Lamparter [Wed, 15 Apr 2020 08:27:49 +0000 (10:27 +0200)]
build: make clippy Makefile rules nicer

These are easy to get subtly wrong, and doing so can cause
nondeterministic failures when racing in parallel builds.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agotools/symalyzer: fix copypasta
David Lamparter [Thu, 23 Apr 2020 18:01:23 +0000 (20:01 +0200)]
tools/symalyzer: fix copypasta

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agopython: move MakeVars class into separate module
David Lamparter [Thu, 23 Apr 2020 18:01:14 +0000 (20:01 +0200)]
python: move MakeVars class into separate module

... so I can reuse it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobuild: use VPATH for vtysh_scan
David Lamparter [Wed, 15 Apr 2020 08:45:08 +0000 (10:45 +0200)]
build: use VPATH for vtysh_scan

No need to put $(top_srcdir) everywhere.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agoMerge pull request #6249 from chiragshah6/yang_nb5
Rafael Zalamena [Fri, 24 Apr 2020 13:17:55 +0000 (10:17 -0300)]
Merge pull request #6249 from chiragshah6/yang_nb5

lib: yang wrapper for date-and-time

5 years agotests: Adopt some tests to PfxSnt counter 6295/head
Donatas Abraitis [Thu, 23 Apr 2020 08:49:22 +0000 (11:49 +0300)]
tests: Adopt some tests to PfxSnt counter

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: Show PfxSnt for `show bgp <afi> <safi>` command
Donatas Abraitis [Wed, 22 Apr 2020 20:39:13 +0000 (23:39 +0300)]
bgpd: Show PfxSnt for `show bgp <afi> <safi>` command

JSON output was already in, just printing in CLI as well.

```
root@exit1-debian-9:~# vtysh -c 'show bgp ipv4 summary'

IPv4 Unicast Summary:
BGP router identifier 10.10.10.1, local AS number 65001 vrf-id 0
BGP table version 100003
RIB entries 200005, using 37 MiB of memory
Peers 1, using 21 KiB of memory

... MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
...      64       157        0    0    0 00:01:18            0   100003

Total number of neighbors 1
```

JSON:

```
root@exit1-debian-9:~# vtysh -c 'show bgp ipv4 summary json' \ |
> jq '.ipv4Unicast.peers."192.168.0.2".pfxSnt'
100003
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #6279 from opensourcerouting/nb-cb-args
Donald Sharp [Fri, 24 Apr 2020 12:09:16 +0000 (08:09 -0400)]
Merge pull request #6279 from opensourcerouting/nb-cb-args

*: change the signature of the northbound callbacks to be  more flexible

5 years agoMerge pull request #6282 from opensourcerouting/fix-isisd-sh-run
Donald Sharp [Fri, 24 Apr 2020 12:07:57 +0000 (08:07 -0400)]
Merge pull request #6282 from opensourcerouting/fix-isisd-sh-run

isisd: fix display of "isis bfd" in the running configuration

5 years agoMerge pull request #6292 from ton31337/fix/revert_6277
Donald Sharp [Fri, 24 Apr 2020 12:05:09 +0000 (08:05 -0400)]
Merge pull request #6292 from ton31337/fix/revert_6277

Revert "bgpd: Show PfxSnt for `show bgp <afi> <safi>` command"

5 years agoMerge pull request #6274 from mjstapp/fix_lde_blocking_sleep
Olivier Dugeon [Fri, 24 Apr 2020 07:34:27 +0000 (09:34 +0200)]
Merge pull request #6274 from mjstapp/fix_lde_blocking_sleep

ldpd: use a timer instead of sleeping in LM init

5 years agoRevert "tests: Adopt some tests to PfxSnt counter" 6292/head
Donatas Abraitis [Fri, 24 Apr 2020 07:00:17 +0000 (10:00 +0300)]
Revert "tests: Adopt some tests to PfxSnt counter"

This reverts commit 6e0f90413ef43a154d84ff62bd04eb49366683a0.

5 years agoRevert "bgpd: Show PfxSnt for `show bgp <afi> <safi>` command"
Donatas Abraitis [Fri, 24 Apr 2020 07:00:13 +0000 (10:00 +0300)]
Revert "bgpd: Show PfxSnt for `show bgp <afi> <safi>` command"

This reverts commit 776e7cf5ce9cc0a55a48beb432faacf7ce7c97f9.

5 years agoMerge pull request #6277 from ton31337/feature/show_bgp_afi_safi_sndpfx
Sri Mohana Singamsetty [Fri, 24 Apr 2020 03:20:07 +0000 (20:20 -0700)]
Merge pull request #6277 from ton31337/feature/show_bgp_afi_safi_sndpfx

bgpd: Show PfxSnt for `show bgp <afi> <safi>` command

5 years agoMerge pull request #6262 from qlyoung/remove-sprintf
David Lamparter [Thu, 23 Apr 2020 18:27:26 +0000 (20:27 +0200)]
Merge pull request #6262 from qlyoung/remove-sprintf

5 years agoisisd: fix display of "isis bfd" in the running configuration 6282/head
Renato Westphal [Thu, 23 Apr 2020 14:49:01 +0000 (11:49 -0300)]
isisd: fix display of "isis bfd" in the running configuration

Since this command is modeled using YANG, it's already displayed
as part of the call to nb_cli_show_dnode_cmds(). Calling the
'isis_circuit_config_write' hook was only making that command
to be displayed twice.

The aforementioned hook is still necessary for fabricd, which wasn't
converted to the new northbound model yet.

Fixes #6281.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #6184 from kssoman/route
Stephen Worley [Thu, 23 Apr 2020 15:10:59 +0000 (11:10 -0400)]
Merge pull request #6184 from kssoman/route

bgpd: When static default route is present in RIB and advertised to p…

5 years agoldpd: use a timer instead of sleeping in LM init 6274/head
Mark Stapp [Wed, 22 Apr 2020 15:39:50 +0000 (11:39 -0400)]
ldpd: use a timer instead of sleeping in LM init

Stop sleeping if synchronous label-manager zapi session
has trouble during init: retry using a timer instead. Move
initial label-block request to a point where the LM zapi
session is known to be running. Remove the use of the
daemon 'instance' - we're using the session_id to distinguish
the LM zapi session.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years ago*: change the signature of the northbound callbacks to be more flexible 6279/head
Renato Westphal [Sat, 4 Apr 2020 16:38:51 +0000 (13:38 -0300)]
*: change the signature of the northbound callbacks to be more flexible

Having a fixed set of parameters for each northbound callback isn't a
good idea since it makes it difficult to add new parameters whenever
that becomes necessary, as several hundreds or thousands of existing
callbacks need to be updated accordingly.

To remediate this issue, this commit changes the signature of all
northbound callbacks to have a single parameter: a pointer to a
'nb_cb_x_args' structure (where x is different for each type
of callback). These structures encapsulate all real parameters
(both input and output) the callbacks need to have access to. And
adding a new parameter to a given callback is as simple as adding
a new field to the corresponding 'nb_cb_x_args' structure, without
needing to update any instance of that callback in any daemon.

This commit includes a .cocci semantic patch that can be used to
update old code to the new format automatically.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #6278 from opensourcerouting/cpp-extern-blocks
Donald Sharp [Thu, 23 Apr 2020 12:01:00 +0000 (08:01 -0400)]
Merge pull request #6278 from opensourcerouting/cpp-extern-blocks

lib, zebra: add missing extern "C" {} blocks to new header files

5 years agotests: Adopt some tests to PfxSnt counter 6277/head
Donatas Abraitis [Thu, 23 Apr 2020 08:49:22 +0000 (11:49 +0300)]
tests: Adopt some tests to PfxSnt counter

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: Show PfxSnt for `show bgp <afi> <safi>` command
Donatas Abraitis [Wed, 22 Apr 2020 20:39:13 +0000 (23:39 +0300)]
bgpd: Show PfxSnt for `show bgp <afi> <safi>` command

JSON output was already in, just printing in CLI as well.

```
root@exit1-debian-9:~# vtysh -c 'show bgp ipv4 summary'

IPv4 Unicast Summary:
BGP router identifier 10.10.10.1, local AS number 65001 vrf-id 0
BGP table version 100003
RIB entries 200005, using 37 MiB of memory
Peers 1, using 21 KiB of memory

... MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
...      64       157        0    0    0 00:01:18            0   100003

Total number of neighbors 1
```

JSON:

```
root@exit1-debian-9:~# vtysh -c 'show bgp ipv4 summary json' \ |
> jq '.ipv4Unicast.peers."192.168.0.2".pfxSnt'
100003
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #6025 from patrasar/rp-info-igmp-group-json-fix
Donatas Abraitis [Thu, 23 Apr 2020 08:05:06 +0000 (11:05 +0300)]
Merge pull request #6025 from patrasar/rp-info-igmp-group-json-fix

pimd: Modified rp-info json o/p

5 years agolib: create a wrapper function for all northbound callbacks
Renato Westphal [Wed, 22 Apr 2020 00:27:47 +0000 (21:27 -0300)]
lib: create a wrapper function for all northbound callbacks

The intention here is to keep the code more organized. These wrappers
should be used by the northbound clients only, and never directly
by any YANG backend code.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #6275 from donaldsharp/fix_frr
Lou Berger [Thu, 23 Apr 2020 03:49:41 +0000 (23:49 -0400)]
Merge pull request #6275 from donaldsharp/fix_frr

yang: Convert to `FRRouting` for organization

5 years agolib, zebra: add missing extern "C" {} blocks to new header files 6278/head
Renato Westphal [Mon, 20 Apr 2020 23:53:19 +0000 (20:53 -0300)]
lib, zebra: add missing extern "C" {} blocks to new header files

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: Configuring default-originate withdraws default route 6184/head
Soman K S [Wed, 8 Apr 2020 09:34:10 +0000 (15:04 +0530)]
bgpd: Configuring default-originate withdraws default route

Issue:
Configuring default-originate when static default route is previously
advertised results in withdrawal of the route.

Fix :
Delete the adj-out entry for the previously advertised static
default route without sending explicit withdraw message.

Signed-off-by: kssoman <somanks@gmail.com>
5 years agoMerge pull request #6242 from pguibert6WIND/flowspec_nlri_too_big
Quentin Young [Wed, 22 Apr 2020 17:02:50 +0000 (13:02 -0400)]
Merge pull request #6242 from pguibert6WIND/flowspec_nlri_too_big

bgpd: handle fs nlri over 240 bytes

5 years agoMerge pull request #6272 from opensourcerouting/duplicated-fpm-doc
Quentin Young [Wed, 22 Apr 2020 17:01:47 +0000 (13:01 -0400)]
Merge pull request #6272 from opensourcerouting/duplicated-fpm-doc

doc: remove duplicated command documentation

5 years agoyang: Convert to `FRRouting` for organization 6275/head
Donald Sharp [Wed, 22 Apr 2020 16:45:37 +0000 (12:45 -0400)]
yang: Convert to `FRRouting` for organization

We should be using `FRRouting` as our organization.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #6265 from patrasar/pim-yang
Quentin Young [Wed, 22 Apr 2020 16:43:02 +0000 (12:43 -0400)]
Merge pull request #6265 from patrasar/pim-yang

yang: Defining yang files for pim

5 years agoyang: Defining yang files for pim 6265/head
Sarita Patra [Tue, 21 Apr 2020 11:55:18 +0000 (04:55 -0700)]
yang: Defining yang files for pim

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agolib: yang wrapper for date-and-time 6249/head
Chirag Shah [Thu, 9 Apr 2020 17:28:43 +0000 (10:28 -0700)]
lib: yang wrapper for date-and-time

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoMerge pull request #5944 from donaldsharp/vrf_stoppage
Russ White [Wed, 22 Apr 2020 15:35:53 +0000 (11:35 -0400)]
Merge pull request #5944 from donaldsharp/vrf_stoppage

Vrf stoppage

5 years agopimd: Added a new field "rpAddress" in "show ip pim rp-info json 6025/head
Sarita Patra [Tue, 14 Apr 2020 11:24:15 +0000 (04:24 -0700)]
pimd: Added a new field "rpAddress" in "show ip pim rp-info json

Fix: Added a new field "rpAddress" in "show ip pim rp-info json"
Before:
"40.0.0.2":[
    {
      "outboundInterface":"ens224",
      "group":"224.0.0.0\/4",
      "source":"Static"
    }
After:
"40.0.0.2":[
    {
      "rpAddress":"40.0.0.2",
      "outboundInterface":"ens224",
      "group":"224.0.0.0\/4",
      "source":"Static"
    }

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agozebra: Prevent awful misconfiguration in vrf's 5944/head
Donald Sharp [Mon, 9 Mar 2020 13:50:18 +0000 (09:50 -0400)]
zebra: Prevent awful misconfiguration in vrf's

Currently the linux kernel allows you to specify the same
table id -> multiple vrf's.  While I am arguing with
the kernel people about proper behavior here let's
just remove this as a possiblity from happening and
mark it a zebra stopable misconfiguration.

(Effectively we are preventing a crash down the line
as that all over FRR we assume it's a unique
mapping not a many to one).

Why fail hard?  Because we hope to get the person
who misconfigured it to actually notice immediately
not hours or days down the line when shit hits the fan.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Expose vrf lookup by table id out of rt_netlink.c
Donald Sharp [Mon, 9 Mar 2020 13:47:46 +0000 (09:47 -0400)]
zebra: Expose vrf lookup by table id out of rt_netlink.c

The function rt_netlink.c is using to lookup the vrf by
passed in table id.

I'm also going to pretend that this function is not
so awful to run when we have a large number of routes
incoming.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc: improve FPM clear command doc 6272/head
Rafael Zalamena [Wed, 22 Apr 2020 13:46:18 +0000 (10:46 -0300)]
doc: improve FPM clear command doc

Use the old description as it looks more complete than the current.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agodoc: remove duplicated command documentation
Rafael Zalamena [Wed, 22 Apr 2020 13:32:06 +0000 (10:32 -0300)]
doc: remove duplicated command documentation

Fixes a documentation warning during compilation.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #6269 from donaldsharp/coverity_likes_coverity
Donatas Abraitis [Wed, 22 Apr 2020 13:16:57 +0000 (16:16 +0300)]
Merge pull request #6269 from donaldsharp/coverity_likes_coverity

Coverity likes coverity

5 years agoospfd: Limit possible message read to our buffer size 6269/head
Donald Sharp [Tue, 21 Apr 2020 12:09:58 +0000 (08:09 -0400)]
ospfd: Limit possible message read to our buffer size

It's possible(but unlikely) that a read of data from the
network will give us bogus data.  Don't automatically
just trust the data size from the network and limit
the read to the size of the buffer we have in play.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Cleanup dead code
Donald Sharp [Tue, 21 Apr 2020 11:50:27 +0000 (07:50 -0400)]
zebra: Cleanup dead code

There are a couple of switch statements in netlink_route_info_encode
in zebra_fpm_netlink.c that had logically dead code.  We have
a switch statement let's take actual advantage of it instead
of doing gyrations to what we want.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #6268 from opensourcerouting/atomlist-cxx-compat
Donald Sharp [Wed, 22 Apr 2020 11:28:43 +0000 (07:28 -0400)]
Merge pull request #6268 from opensourcerouting/atomlist-cxx-compat

lib: make atomlist code C++ compatible

5 years agobgpd: handle fs nlri over 240 bytes 6242/head
Philippe Guibert [Mon, 6 Apr 2020 15:15:09 +0000 (17:15 +0200)]
bgpd: handle fs nlri over 240 bytes

the nlri flowspec above 240 bytes size was not handled.
Over 240 bytes, the length is 2 bytes length, and a calculation must be
done to obtain the real length. This commit handles it appropriately.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #6191 from NaveenThanikachalam/ibgp_connected
Donatas Abraitis [Tue, 21 Apr 2020 20:16:03 +0000 (23:16 +0300)]
Merge pull request #6191 from NaveenThanikachalam/ibgp_connected

bgpd: Enforce self-next-hop check in next-hop update.

5 years agoMerge pull request #6126 from sarav511/watermark
Donald Sharp [Tue, 21 Apr 2020 20:14:21 +0000 (16:14 -0400)]
Merge pull request #6126 from sarav511/watermark

pimd: Implement watermark warning for igmp group count and add igmp group count

5 years agolib/frrcu: make C++ compatible 6268/head
David Lamparter [Tue, 21 Apr 2020 19:37:09 +0000 (21:37 +0200)]
lib/frrcu: make C++ compatible

... by dropping seqlock.h from the header's includes;  it's only needed
in the C code in frrcu.c.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib/atomlist: make C++ compatible
David Lamparter [Tue, 21 Apr 2020 19:35:44 +0000 (21:35 +0200)]
lib/atomlist: make C++ compatible

... by using `atomic_atomptr_t`.  Other ideas seemed worse.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #6267 from mjstapp/fix_ospf6_unlock_sa
Quentin Young [Tue, 21 Apr 2020 18:31:56 +0000 (14:31 -0400)]
Merge pull request #6267 from mjstapp/fix_ospf6_unlock_sa

ospf6d: fix SA warnings

5 years agopimd, lib: suppress compiler warnings on snprintf 6262/head
Quentin Young [Tue, 21 Apr 2020 16:56:42 +0000 (12:56 -0400)]
pimd, lib: suppress compiler warnings on snprintf

truncation warnings on old compilers

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #6253 from opensourcerouting/fpm-extra
Quentin Young [Tue, 21 Apr 2020 15:28:05 +0000 (11:28 -0400)]
Merge pull request #6253 from opensourcerouting/fpm-extra

zebra/fpm: fix shutdown and add more documentation

5 years agoMerge pull request #6264 from opensourcerouting/doc-workflow-20200420
Donald Sharp [Tue, 21 Apr 2020 15:16:24 +0000 (11:16 -0400)]
Merge pull request #6264 from opensourcerouting/doc-workflow-20200420

doc: workflow updates

5 years agoospf6d: fix SA warnings 6267/head
Mark Stapp [Tue, 21 Apr 2020 15:01:18 +0000 (11:01 -0400)]
ospf6d: fix SA warnings

Clean up some SA warnings in use of ospf6_lsa_unlock()

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #6147 from opensourcerouting/ldpd-broken-lsps
Russ White [Tue, 21 Apr 2020 13:08:06 +0000 (09:08 -0400)]
Merge pull request #6147 from opensourcerouting/ldpd-broken-lsps

ldpd: don't drop packets coming through a broken LSP

5 years agodoc: add some Github workflow notes 6264/head
David Lamparter [Mon, 20 Apr 2020 21:51:37 +0000 (23:51 +0200)]
doc: add some Github workflow notes

Just writing down what seems to be established procedure.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodoc: document strcpy & sprintf ban
David Lamparter [Mon, 20 Apr 2020 21:33:21 +0000 (23:33 +0200)]
doc: document strcpy & sprintf ban

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd, isis, tools: style fixen
Quentin Young [Mon, 20 Apr 2020 23:14:13 +0000 (19:14 -0400)]
bgpd, isis, tools: style fixen

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years ago*: use appropriate buffer sizes, specifiers
Quentin Young [Mon, 20 Apr 2020 18:28:39 +0000 (14:28 -0400)]
*: use appropriate buffer sizes, specifiers

- Fix 1 byte overflow when showing GR info in bgpd
- Use PATH_MAX for path buffers
- Use unsigned specifiers for uint16_t's in zebra pbr

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years ago*: manually remove some more sprintf
Quentin Young [Mon, 20 Apr 2020 21:59:31 +0000 (17:59 -0400)]
*: manually remove some more sprintf

Take care of some more complicated cases by hand

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years ago*: sprintf -> snprintf
Quentin Young [Mon, 20 Apr 2020 18:12:38 +0000 (14:12 -0400)]
*: sprintf -> snprintf

Replace sprintf with snprintf where straightforward to do so.

- sprintf's into local scope buffers of known size are replaced with the
  equivalent snprintf call
- snprintf's into local scope buffers of known size that use the buffer
  size expression now use sizeof(buffer)
- sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp
  buffer followed by strlcat

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agotools: add more macros to cocci.h
Quentin Young [Mon, 20 Apr 2020 22:07:17 +0000 (18:07 -0400)]
tools: add more macros to cocci.h

Coccinelle needs to know about complicated macros to understand certain
code paths, add some more macros there.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #6263 from opensourcerouting/zlog-coverity-20200420
Quentin Young [Mon, 20 Apr 2020 23:12:50 +0000 (19:12 -0400)]
Merge pull request #6263 from opensourcerouting/zlog-coverity-20200420

lib/zlog: fix coverity warning

5 years agodoc: remove mailing list patch submission
David Lamparter [Mon, 20 Apr 2020 21:20:13 +0000 (23:20 +0200)]
doc: remove mailing list patch submission

Last patch sent in on the mailing list was in July 2018.  If someone
sends a patch we can still pick it up, but practiced reality is quite
clearly PRs on github.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib/zlog: fix coverity warning 6263/head
David Lamparter [Mon, 20 Apr 2020 21:17:17 +0000 (23:17 +0200)]
lib/zlog: fix coverity warning

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agoMerge pull request #6261 from ton31337/fix/allow_nhlen_32
Donald Sharp [Mon, 20 Apr 2020 20:10:07 +0000 (16:10 -0400)]
Merge pull request #6261 from ton31337/fix/allow_nhlen_32

bgpd: Do not discard an UPDATE if the global nexthop is set to ::

5 years agoMerge pull request #6251 from opensourcerouting/cs-ignore
Donald Sharp [Mon, 20 Apr 2020 20:08:37 +0000 (16:08 -0400)]
Merge pull request #6251 from opensourcerouting/cs-ignore

*: make coverity scan ignore random() calls

5 years agoMerge pull request #6245 from sworleys/NHG-More-Topo
Mark Stapp [Mon, 20 Apr 2020 17:28:14 +0000 (13:28 -0400)]
Merge pull request #6245 from sworleys/NHG-More-Topo

tests: add connected/recursive/duplicte/route-map NHG tests

5 years agobgpd: Do not discard an UPDATE if the global nexthop is set to :: 6261/head
Donatas Abraitis [Mon, 20 Apr 2020 15:46:23 +0000 (18:46 +0300)]
bgpd: Do not discard an UPDATE if the global nexthop is set to ::

When we receive an UPDATE with MP_NEXTHOP len as 32 bytes, we shouldn't
check if the global (1st) nexthop is unspecified.

Peering between bird and FRRouting we receive from Bird something like:
```
rcvd UPDATE w/ attr: , origin i, mp_nexthop ::(fe80::a00:27ff:fe09:f8a3)
```
The link-local (2nd) nexthop is valid and validated later in the code.

Before it was marked:
```
IPv6 unicast -- DENIED due to: martian or self next-hop;
```

After it's a valid prefix:
```
spine1-debian-9# show bgp
BGP table version is 0, local router ID is 2.2.2.2, vrf id 0
Default local pref 100, local AS 65002
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
   2a02:4780::/64   fe80::a00:27ff:fe09:f8a3
                                                           0 65001 i

Displayed  1 routes and 1 total paths
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #6260 from ton31337/fix/01_to_bool
Donald Sharp [Mon, 20 Apr 2020 12:30:28 +0000 (08:30 -0400)]
Merge pull request #6260 from ton31337/fix/01_to_bool

bgpd: Use true/false for reject_as_sets

5 years agobgpd: Use true/false for reject_as_sets 6260/head
Donatas Abraitis [Mon, 20 Apr 2020 09:59:52 +0000 (12:59 +0300)]
bgpd: Use true/false for reject_as_sets

Just remove MACROS and use true/false.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #6231 from dslicenc/v6-ra-hoplimit
Donatas Abraitis [Sat, 18 Apr 2020 19:48:20 +0000 (22:48 +0300)]
Merge pull request #6231 from dslicenc/v6-ra-hoplimit

zebra: add ability to set hoplimit for IPv6 RAs

5 years agoMerge pull request #6164 from ton31337/feature/rfc8212_enabled_traditional_profile
Donald Sharp [Sat, 18 Apr 2020 19:06:04 +0000 (15:06 -0400)]
Merge pull request #6164 from ton31337/feature/rfc8212_enabled_traditional_profile

bgpd: Enable rfc8212 by default except datacenter profile

5 years agoMerge pull request #6256 from qlyoung/pimd-no-strcpy
David Lamparter [Sat, 18 Apr 2020 18:47:32 +0000 (20:47 +0200)]
Merge pull request #6256 from qlyoung/pimd-no-strcpy