]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agotools: retain sanity when reloading under systemd
David Lamparter [Sun, 9 Jun 2019 23:35:04 +0000 (01:35 +0200)]
tools: retain sanity when reloading under systemd

Without this, we end up restarting watchfrr with the systemd watchdog
non-functional & tripped a bit later.  Also, if watchfrr is in the
"control" cgroup, systemd 232 will kill it.  (241 apparently doesn't.
Can't find anything about this in systemd's ChangeLog though.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agoMerge pull request #4457 from mjstapp/fix_sa_warning
Rafael Zalamena [Thu, 6 Jun 2019 19:33:25 +0000 (16:33 -0300)]
Merge pull request #4457 from mjstapp/fix_sa_warning

bgpd,babeld,bfdd,lib,ripngd,nhrpd: clean up SA warnings

4 years agoMerge pull request #4428 from mjstapp/topo_update_ospf6
Rafael Zalamena [Thu, 6 Jun 2019 18:57:49 +0000 (15:57 -0300)]
Merge pull request #4428 from mjstapp/topo_update_ospf6

topotests: migrate ospf6 test to topogen framework

4 years agotests: Add ip6_route_zebra lib function
Mark Stapp [Thu, 6 Jun 2019 15:49:15 +0000 (11:49 -0400)]
tests: Add ip6_route_zebra lib function

Add a common function to retrieve and canonicalize
'show ipv6 route' output for use in topotests. Use that in
the test_ospf6_topo1 test; update the corresponding 'expected'
results files to match the lib function.

Replace some 'print' with 'logger' statements in that test also.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib,bgpd,babeld,ripngd,nhrpd,bfdd: clean up SA warnings
Mark Stapp [Tue, 4 Jun 2019 19:06:26 +0000 (15:06 -0400)]
lib,bgpd,babeld,ripngd,nhrpd,bfdd: clean up SA warnings

Clean up several SA warnings.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #4370 from pguibert6WIND/fix_interface_rtadv2
Donald Sharp [Thu, 6 Jun 2019 14:25:09 +0000 (10:25 -0400)]
Merge pull request #4370 from pguibert6WIND/fix_interface_rtadv2

Fix Router advertisements per VRF

4 years agoMerge pull request #4468 from donaldsharp/isis_v6_addr_count
David Lamparter [Thu, 6 Jun 2019 13:18:20 +0000 (15:18 +0200)]
Merge pull request #4468 from donaldsharp/isis_v6_addr_count

isisd: The RFC states that v6 addresses are limited to 16 in a hello …

4 years agoMerge pull request #4333 from opensourcerouting/printfrr
Donald Sharp [Wed, 5 Jun 2019 17:30:42 +0000 (13:30 -0400)]
Merge pull request #4333 from opensourcerouting/printfrr

printfrr() world domination tour

4 years agoMerge pull request #4431 from donaldsharp/mad_gainz
Rafael Zalamena [Wed, 5 Jun 2019 14:30:19 +0000 (11:30 -0300)]
Merge pull request #4431 from donaldsharp/mad_gainz

Switch over to `-N FOO` adding FOO to the various directories/files we open up

4 years agoMerge pull request #4459 from donaldsharp/bfd_access_list_ignore
Rafael Zalamena [Wed, 5 Jun 2019 13:15:16 +0000 (10:15 -0300)]
Merge pull request #4459 from donaldsharp/bfd_access_list_ignore

bfdd: Modify bfdd to quietly accept access-lists

4 years agobfdd: Modify bfdd to quietly accept access-lists
Donald Sharp [Wed, 5 Jun 2019 01:38:11 +0000 (21:38 -0400)]
bfdd: Modify bfdd to quietly accept access-lists

The `access-list ...` command was causing bfdd to return
'unknown commands'.  Make bfdd at least cognizant of
access-lists enough to not create strange error messages

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoisisd: The RFC states that v6 addresses are limited to 16 in a hello packet
Donald Sharp [Wed, 5 Jun 2019 01:15:43 +0000 (21:15 -0400)]
isisd: The RFC states that v6 addresses are limited to 16 in a hello packet

The RFC states we can send only up to 16 v6 addresses in a hello packet
and cannot send sub tlv's of that type.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: Update the documentation to reflect -N changes
Donald Sharp [Fri, 31 May 2019 00:16:46 +0000 (20:16 -0400)]
doc: Update the documentation to reflect -N changes

The -N <namespace> option is now used to control the location
of various control files and sockets.  Update the documentation
to reflect this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years ago*: Convert over to all -N namespace to change DAEMON_VTY_DIR
Donald Sharp [Thu, 30 May 2019 23:55:26 +0000 (19:55 -0400)]
*: Convert over to all -N namespace to change DAEMON_VTY_DIR

When the user specifies -N namespace allow it to influence the
frr_vtydir(DAEMON_VTY_DIR) to have namespace in it's path
like so: $frrstate_dir/<namespace>

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4456 from opensourcerouting/workflow-update
Mark Stapp [Tue, 4 Jun 2019 17:38:39 +0000 (13:38 -0400)]
Merge pull request #4456 from opensourcerouting/workflow-update

workflow updates for version numbers & C++

4 years agotopotests: test bgp ipv6 vrf lite unnumbered with ipv6 rt advertisements
Philippe Guibert [Wed, 27 Mar 2019 10:13:38 +0000 (11:13 +0100)]
topotests: test bgp ipv6 vrf lite unnumbered with ipv6 rt advertisements

bgp ipv6 implies that routing advertisements be available for all vrf.
in the case of the vrf backend is network namespace, this should be
tested too. in addition to configure addresses per interface on a
separate vrf, the test also checks for BGP connectivity.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agotopotests: test bgp ipv6 unnumbered with ipv6 rt advertisements
Philippe Guibert [Wed, 27 Mar 2019 10:13:38 +0000 (11:13 +0100)]
topotests: test bgp ipv6 unnumbered with ipv6 rt advertisements

bgp ipv6 implies that routing advertisements be available for all vrf.
in the case of the vrf backend is network namespace, this should be
tested too. in addition to configure addresses per interface on a
separate vrf, the test also checks for BGP connectivity.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: keep rtadv_sock field in zrouter for optimisation
Philippe Guibert [Wed, 27 Mar 2019 14:05:58 +0000 (15:05 +0100)]
zebra: keep rtadv_sock field in zrouter for optimisation

in the case the vrf backend is vrf-lite, there is no need to have
separate sockets. use a socket located in zrouter, so that when needing
the socket, a common API is used. that API will return the appropriate
socket value.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: move rtadv service from zrouter to zvrf
Philippe Guibert [Wed, 27 Mar 2019 09:25:13 +0000 (10:25 +0100)]
zebra: move rtadv service from zrouter to zvrf

when network namespace is used as vrf backend, there is need to have
separate contexts for rtadv contexts.
route advertisements have to look for appropriate interface based on
zvrf context.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agoworkflow: document current C++ approach
David Lamparter [Tue, 4 Jun 2019 16:12:19 +0000 (18:12 +0200)]
workflow: document current C++ approach

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoworkflow: update notes for release numbering
David Lamparter [Tue, 4 Jun 2019 16:02:35 +0000 (18:02 +0200)]
workflow: update notes for release numbering

People have been complaining our major version number increases to
fast and/or in a meaningless way...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years ago*: Convert to using frr_vtydir instead of DAEMON_VTY_DIR
Donald Sharp [Thu, 30 May 2019 23:38:00 +0000 (19:38 -0400)]
*: Convert to using frr_vtydir instead of DAEMON_VTY_DIR

In a variety of places we are using DAEMON_VTY_DIR, convert
to use frr_vtydir.  This will allow us in a future commit
to have the -N namespace option be automatically used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoldpd: Allow for -N <namespace> to influence location of LDPD_SOCKET
Donald Sharp [Thu, 30 May 2019 23:23:15 +0000 (19:23 -0400)]
ldpd: Allow for -N <namespace> to influence location of LDPD_SOCKET

If --ctl_socket is used this will override any other option and will
be used

If -N <namespace> is used, then we will setup the LDPD_SOCKET
in $frr_statedir/<namespace>/ldpd.sock

If neither option is used, then we will use $frr_statedir/ldpd.sock

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobfdd: Allow -N to influence BFDD_CONTROL_SOCKET
Donald Sharp [Thu, 30 May 2019 23:10:35 +0000 (19:10 -0400)]
bfdd: Allow -N to influence BFDD_CONTROL_SOCKET

When selecting to run bfdd with -N allow the namespace passed
in to be added to the $frr_statedir/<namespace name>/bfdd.sock

If --bfdctl is passed in that will override the -N option.

If neither --bfdctl or -N is passed in then the default
of  $frr_statedir/bfdd.sock is used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Allow -N to modify the zapi domain socket
Donald Sharp [Thu, 30 May 2019 22:51:00 +0000 (18:51 -0400)]
lib: Allow -N to modify the zapi domain socket

When using -z, allow that to override the zapi domain socket
path.  If using -N add the namespace name to the path to
$frr_statedir/<namespace>/zserv.api.  If you don't specify
the -N or -z option then it is $frr_statedir/zserv.api

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4452 from donaldsharp/mroute_count
Russ White [Tue, 4 Jun 2019 13:16:34 +0000 (09:16 -0400)]
Merge pull request #4452 from donaldsharp/mroute_count

pim: Add `clear ip mroute [vrf NAME] count` command

4 years agoMerge pull request #4454 from donaldsharp/evpn_vni_seq_display
Russ White [Tue, 4 Jun 2019 13:15:35 +0000 (09:15 -0400)]
Merge pull request #4454 from donaldsharp/evpn_vni_seq_display

zebra: When displaying `show evpn arp-cache vni XX` add local and rem…

4 years agoMerge pull request #3555 from pguibert6WIND/bgp_wording_vrf_table
Russ White [Tue, 4 Jun 2019 13:14:37 +0000 (09:14 -0400)]
Merge pull request #3555 from pguibert6WIND/bgp_wording_vrf_table

bgpd: use the wording vrf instead of table

4 years agoMerge pull request #4455 from lkrishnamoor/revert
Donald Sharp [Tue, 4 Jun 2019 11:41:09 +0000 (07:41 -0400)]
Merge pull request #4455 from lkrishnamoor/revert

Revert of PR 4078 and PR 4315

4 years agoMerge pull request #4453 from donaldsharp/deprecate_bgp
David Lamparter [Tue, 4 Jun 2019 11:15:45 +0000 (13:15 +0200)]
Merge pull request #4453 from donaldsharp/deprecate_bgp

Deprecate bgp

4 years agoRevert of PR 4078 and PR 4315
Lakshman Krishnamoorthy [Mon, 3 Jun 2019 22:36:02 +0000 (15:36 -0700)]
Revert of PR 4078 and PR 4315

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
4 years agozebra: When displaying `show evpn arp-cache vni XX` add local and remote seq
Donald Sharp [Mon, 3 Jun 2019 19:11:17 +0000 (15:11 -0400)]
zebra: When displaying `show evpn arp-cache vni XX` add local and remote seq

Add the local and remote sequence number to the `show evpn arp-cache vni XX` command.

VNI 1000111 #ARP (IPv4 and IPv6, local and remote) 15

IP                       Type   State    MAC               Remote VTEP           Seq #'s
fe80::202:ff:fe00:15     remote active   00:02:00:00:00:15 6.0.0.31              0/0
fe80::202:ff:fe00:8      local  active   00:02:00:00:00:08                       0/0
60.1.1.111               local  active   00:02:00:00:00:08                       0/0
2060:1:1:1::11           local  active   00:e0:ec:38:49:a1                       0/0
fe80::202:ff:fe00:11     remote active   00:02:00:00:00:11 6.0.0.30              0/0
2060:1:1:1::211          remote active   00:02:00:00:00:11 6.0.0.30              0/0
2060:1:1:1::121          remote active   00:02:00:00:00:0c 6.0.0.29              0/0
60.1.1.211               remote active   00:02:00:00:00:11 6.0.0.30              0/0
fe80::202:ff:fe00:c      remote active   00:02:00:00:00:0c 6.0.0.29              0/0
60.1.1.11                local  active   00:e0:ec:38:49:a1                       0/0
fe80::2e0:ecff:fe38:49a1 local  active   00:e0:ec:38:49:a1                       0/0
60.1.1.221               remote active   00:02:00:00:00:15 6.0.0.31              0/0
2060:1:1:1::111          local  active   00:02:00:00:00:08                       0/0
2060:1:1:1::221          remote active   00:02:00:00:00:15 6.0.0.31              0/0
60.1.1.121               remote active   00:02:00:00:00:0c 6.0.0.29              0/0

The seq numbers are at 0/0 because we have had no mobility events.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Remove BGP_OPT_CONFIG_CISCO
Donald Sharp [Mon, 3 Jun 2019 19:06:16 +0000 (15:06 -0400)]
bgpd: Remove BGP_OPT_CONFIG_CISCO

The BGP_OPT_CONFIG_CISCO command could no longer be set
as such remove it from the system as a viable option to
be used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Remove `[no] bgp config-type <cisco|zebra>`
Donald Sharp [Mon, 3 Jun 2019 18:58:26 +0000 (14:58 -0400)]
bgpd: Remove `[no] bgp config-type <cisco|zebra>`

This command has been deprecated for a year and no-one has complained.
Remove from system.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Remove BGP_OPT_MULTIPLE_INSTANCE flag
Donald Sharp [Mon, 3 Jun 2019 16:55:48 +0000 (12:55 -0400)]
bgpd: Remove BGP_OPT_MULTIPLE_INSTANCE flag

Since we no-longer allow you to select multiple-instance
or not from the cli, let's completely remove the flag
as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Remove deprecated '[no] bgp multiple-instance' command
Donald Sharp [Mon, 3 Jun 2019 16:38:04 +0000 (12:38 -0400)]
bgpd: Remove deprecated '[no] bgp multiple-instance' command

Remove this command from the cli.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4451 from donaldsharp/routemap_return
Sri Mohana Singamsetty [Mon, 3 Jun 2019 18:30:19 +0000 (11:30 -0700)]
Merge pull request #4451 from donaldsharp/routemap_return

lib: Cleanup recent commit warn->werror issues in lib/routemap.c

4 years agodoc: add some printfrr() docs
David Lamparter [Mon, 3 Jun 2019 16:38:40 +0000 (18:38 +0200)]
doc: add some printfrr() docs

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: simplify SEGV handler
David Lamparter [Mon, 3 Jun 2019 16:04:32 +0000 (18:04 +0200)]
lib: simplify SEGV handler

printfrr is AS-Safe, let's simplify the SEGV handler quite a bit by
relying on that.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agotests: exercise printfrr()
David Lamparter [Mon, 20 May 2019 17:51:03 +0000 (19:51 +0200)]
tests: exercise printfrr()

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/printf: ditch reallocarray
David Lamparter [Tue, 14 May 2019 21:21:55 +0000 (23:21 +0200)]
lib/printf: ditch reallocarray

reallocarray() is walled behind stupid feature macros on various
platforms and doesn't quite gain us much in that particular use case.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: add some printfrr specifiers
David Lamparter [Tue, 14 May 2019 14:28:31 +0000 (16:28 +0200)]
lib: add some printfrr specifiers

More to come - these are just the most obvious and easy.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: use printfrr for log & vty
David Lamparter [Tue, 14 May 2019 14:27:30 +0000 (16:27 +0200)]
lib: use printfrr for log & vty

This makes printfrr extensions available in most of our format strings.
snprintf() is the obvious exception.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #4447 from donaldsharp/pim_unused_functions
Rafael Zalamena [Mon, 3 Jun 2019 16:55:22 +0000 (13:55 -0300)]
Merge pull request #4447 from donaldsharp/pim_unused_functions

pimd: Remove unused functions

4 years agodoc: Update pim docs for `clear ip mroute [vrf NAME] count` command
Donald Sharp [Mon, 3 Jun 2019 15:14:16 +0000 (11:14 -0400)]
doc: Update pim docs for `clear ip mroute [vrf NAME] count` command

Simple documentation update for the new `clear ip mroute [vrf NAME] count`
command to the FRRouting documentation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: Add `clear ip mroute [vrf NAME] count` command to pim
Donald Sharp [Mon, 3 Jun 2019 14:39:23 +0000 (10:39 -0400)]
pimd: Add `clear ip mroute [vrf NAME] count` command to pim

When debugging a large number of mroutes and data is changing
fast it is sometimes hard to know what has actually changed.
Add a `clear ip mroute count` command that resets the last
data points gathered and allows you to see what has changed
since the last clear.

Output:
donna.cumulusnetworks.com# show ip mroute count

Source          Group           LastUsed Packets Bytes WrongIf
*               224.0.1.60      272      0       0          0
10.50.11.11     239.255.255.250 2        1       203        1
10.50.11.13     239.255.255.250 66       1       203        1
10.50.11.100    239.255.255.250 68       1       203        1
10.50.11.114    239.255.255.250 62       2       406        1
10.50.11.129    239.255.255.250 10       1       199        1
10.50.11.143    239.255.255.250 44       1       203        1
10.50.11.144    239.255.255.250 44       1       203        1
10.50.11.156    239.255.255.250 66       1       203        1
10.50.11.235    239.255.255.250 149      0       0          0
10.50.11.246    239.255.255.250 54       5       965        1
donna.cumulusnetworks.com# clear ip mroute count
donna.cumulusnetworks.com# show ip mroute count

Source          Group           LastUsed Packets Bytes WrongIf
*               224.0.1.60      279      0       0          0
10.50.11.11     239.255.255.250 9        0       0          0
10.50.11.13     239.255.255.250 73       0       0          0
10.50.11.100    239.255.255.250 76       0       0          0
10.50.11.114    239.255.255.250 69       0       0          0
10.50.11.129    239.255.255.250 17       0       0          0
10.50.11.143    239.255.255.250 51       0       0          0
10.50.11.144    239.255.255.250 51       0       0          0
10.50.11.156    239.255.255.250 73       0       0          0
10.50.11.235    239.255.255.250 156      0       0          0
10.50.11.246    239.255.255.250 61       0       0          0
donna.cumulusnetworks.com# show ip mroute count

Source          Group           LastUsed Packets Bytes WrongIf
*               224.0.1.60      300      0       0          0
10.50.11.11     239.255.255.250 30       0       0          0
10.50.11.13     239.255.255.250 94       0       0          0
10.50.11.100    239.255.255.250 96       0       0          0
10.50.11.114    239.255.255.250 90       0       0          0
10.50.11.119    239.255.255.250 7        1       203        1
10.50.11.127    239.255.255.250 3        2       406        1
10.50.11.129    239.255.255.250 38       0       0          0
10.50.11.143    239.255.255.250 72       0       0          0
10.50.11.144    239.255.255.250 72       0       0          0
10.50.11.156    239.255.255.250 94       0       0          0
10.50.11.197    239.255.255.250 2        1       200        1
10.50.11.235    239.255.255.250 177      0       0          0
10.50.11.246    239.255.255.250 82       0       0          0

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib/printf: add extension support
David Lamparter [Sun, 12 May 2019 19:11:30 +0000 (21:11 +0200)]
lib/printf: add extension support

Inspired by the Linux kernel, this allows us to do %pI4 and similar
things.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/printf: fix some random warnings
David Lamparter [Sun, 12 May 2019 19:10:10 +0000 (21:10 +0200)]
lib/printf: fix some random warnings

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/printf: integrate
David Lamparter [Sun, 12 May 2019 19:10:04 +0000 (21:10 +0200)]
lib/printf: integrate

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/printf: rename & private __find_arguments
David Lamparter [Sun, 12 May 2019 20:39:59 +0000 (22:39 +0200)]
lib/printf: rename & private __find_arguments

These are internal to printf(), and symbols starting with __ are
reserved for the compiler/libc.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/printf: disable wchar_t support
David Lamparter [Sun, 12 May 2019 20:39:28 +0000 (22:39 +0200)]
lib/printf: disable wchar_t support

... we just don't use wchar_t in FRR, no point in having this enabled.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/printf: add %Ld/%Lu for int64_t/uint64_t
David Lamparter [Sun, 12 May 2019 19:11:19 +0000 (21:11 +0200)]
lib/printf: add %Ld/%Lu for int64_t/uint64_t

[u]int64_t is the only type in the intX_t family that needs
special-casing for printf since the calling convention may differ
between 32-bit and 64-bit systems.

Adding the L specifier allows us to eschew the gnarly-looking PRIu64.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: Cleanup recent commit warn->werror issues in lib/routemap.c
Donald Sharp [Mon, 3 Jun 2019 14:44:23 +0000 (10:44 -0400)]
lib: Cleanup recent commit warn->werror issues in lib/routemap.c

The get_route_map_delete_event function should return a value
even if we never get to that part of the function.  Make sure
we know why we are here so it can be fixed appropriately in
the future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetwork.com>
4 years agolib/printf: use system printf for floats
David Lamparter [Sun, 12 May 2019 19:14:12 +0000 (21:14 +0200)]
lib/printf: use system printf for floats

We're not libc, we can just fall back to snprintf() to avoid all this
low-level float mangling.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/printf: cut down to size
David Lamparter [Sun, 12 May 2019 19:07:45 +0000 (21:07 +0200)]
lib/printf: cut down to size

remove various FreeBSD specific bits, as well as the entirety of locale
support.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: import FreeBSD's printf
David Lamparter [Sun, 12 May 2019 18:03:09 +0000 (20:03 +0200)]
lib: import FreeBSD's printf

... from current SVN HEAD (not that it has been touched in the past 2
years ...)

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agopimd: Convert strncpy to strlcpy in pim_cmd.c
Donald Sharp [Mon, 3 Jun 2019 14:09:22 +0000 (10:09 -0400)]
pimd: Convert strncpy to strlcpy in pim_cmd.c

A couple of places of strncpy snuck in due to my confusion
about if Quentin's earlier change had gotten in.  Just some
code in flux.  This should fix the issue/warnings in our
CI system.

4 years agoMerge pull request #4417 from sworleys/Move-Multicast-Mode
David Lamparter [Mon, 3 Jun 2019 13:59:48 +0000 (15:59 +0200)]
Merge pull request #4417 from sworleys/Move-Multicast-Mode

zebra: Move multicast mode to being a property of the router

4 years agoMerge pull request #4436 from donaldsharp/tools_frr_flush
David Lamparter [Mon, 3 Jun 2019 13:53:07 +0000 (15:53 +0200)]
Merge pull request #4436 from donaldsharp/tools_frr_flush

tools: On shutdown no need to flush from tools/frr.in script

4 years agoNo log commands (#3581)
David Lamparter [Mon, 3 Jun 2019 13:52:32 +0000 (15:52 +0200)]
No log commands (#3581)

No log commands

4 years agoMerge pull request #4345 from NaveenThanikachalam/route_map_dep
Donald Sharp [Mon, 3 Jun 2019 13:19:59 +0000 (09:19 -0400)]
Merge pull request #4345 from NaveenThanikachalam/route_map_dep

lib: Changes made to dependencies of a route-map do not take effect dynamically.

4 years agopimd: Remove unused functions
Donald Sharp [Mon, 3 Jun 2019 12:38:38 +0000 (08:38 -0400)]
pimd: Remove unused functions

Recent commits rewrote the `clear mroute` command and this caused
these two two functions to no longer be used, remove.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4078 from lkrishnamoor/rmap_vni_filter
Donald Sharp [Mon, 3 Jun 2019 11:45:47 +0000 (07:45 -0400)]
Merge pull request #4078 from lkrishnamoor/rmap_vni_filter

bgpd: Filtering received EVPN routes based on VNI does not work

4 years agoMerge pull request #4274 from rgirada/fix_clear_mroute
Donald Sharp [Mon, 3 Jun 2019 11:39:04 +0000 (07:39 -0400)]
Merge pull request #4274 from rgirada/fix_clear_mroute

pimd: Re-deisgn the "clear ip mroute" command.

4 years agoMerge pull request #4445 from pguibert6WIND/display_show_nht_if_not_found
Donald Sharp [Mon, 3 Jun 2019 11:14:54 +0000 (07:14 -0400)]
Merge pull request #4445 from pguibert6WIND/display_show_nht_if_not_found

zebra: the route nexthop interfaces per vrf were not displayed ok

4 years agozebra: the route nexthop interfaces per vrf were not displayed ok
Philippe Guibert [Mon, 3 Jun 2019 09:40:24 +0000 (11:40 +0200)]
zebra: the route nexthop interfaces per vrf were not displayed ok

the interface search done was not looking in the appropriate zns. The
display was then wrong. Update the show command with the correct zns.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agoMerge pull request #4442 from opensourcerouting/libtool-doc
Donald Sharp [Sun, 2 Jun 2019 22:54:24 +0000 (18:54 -0400)]
Merge pull request #4442 from opensourcerouting/libtool-doc

doc: add libtool note

4 years agodoc: add libtool note
David Lamparter [Sun, 2 Jun 2019 18:44:38 +0000 (20:44 +0200)]
doc: add libtool note

(and document that ASAN/MSAN/TSAN are mutually exclusive while at it)

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agotools: On shutdown no need to flush from tools/frr.in script
Donald Sharp [Sat, 1 Jun 2019 01:47:30 +0000 (21:47 -0400)]
tools: On shutdown no need to flush from tools/frr.in script

Zebra already flushes routes on proper shutdown if you are not
using the -K option.  If you are using the -K option then you
do not want the tools/frr script to flush routes.

If zebra crashes and we restart then load up will either delete
the routes or leave them depending on the -K option.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4435 from donaldsharp/zclient_buffer_sizing
Mark Stapp [Fri, 31 May 2019 20:20:38 +0000 (16:20 -0400)]
Merge pull request #4435 from donaldsharp/zclient_buffer_sizing

lib, zebra: Ensure route encoding has enough space

4 years agoMerge pull request #4430 from lkrishnamoor/hostname_crash
Donald Sharp [Fri, 31 May 2019 19:02:10 +0000 (15:02 -0400)]
Merge pull request #4430 from lkrishnamoor/hostname_crash

lib: crash when FRR hostname length > 80 chars

4 years agotopotests: migrate ospf6 test to topogen framework
Mark Stapp [Tue, 28 May 2019 20:43:03 +0000 (16:43 -0400)]
topotests: migrate ospf6 test to topogen framework

Migrate/upgrade the ospf6-topo1 topotest to the topogen
framework. The framework supports improved logging, among
other things. Also add a couple of zebra debugs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: crash when FRR hostname length > 80 chars
Lakshman Krishnamoorthy [Thu, 30 May 2019 21:56:55 +0000 (14:56 -0700)]
lib: crash when FRR hostname length > 80 chars

Although the RFC states hostname length should be < 255 chars,
FRR allows infinite length technically. However, when you try
to set a hostname > 80 chars, you would immediately notice a crash.

RCA: Crash due to buffer overflow. Large buffer sprintf'd into smaller
buffer. Usage of sprintf function instead of snprintf which is safer.

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
4 years agobgpd: Filtering received EVPN routes based on VNI does not work
Lakshman Krishnamoorthy [Fri, 31 May 2019 17:22:11 +0000 (10:22 -0700)]
bgpd: Filtering received EVPN routes based on VNI does not work

Issue1: When "neighbor X.X.X.X route-map RM-VNI-FILTER in" is configured under evpn address-family,
all the received routes are dropped regardless of whether the route has a matching vni or not.

Issue2: Routes with 2 labels are not filtered correctly

Issue3: Interpreting the label based on tunnel type, vxlan was not done correctly.
Vxlan label has 24 bits, whereas, MPLS label is 20 bits long

Fix1: The handler bgp_update() that services the received route ignored the route's label while deciding whether to filter it or not. As part of the fix, the handler now uses the label info to make the decision about whether to filter the route or not.

Fix2: route_match_vni() now tries to match both the labels within the route, not just the one.

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
4 years agolib: Changes made to dependencies of a r-map do not take effect.
Naveen Thanikachalam [Wed, 15 May 2019 07:09:08 +0000 (00:09 -0700)]
lib: Changes made to dependencies of a r-map do not take effect.

Say, more than one sequence of a route-map uses the same named entity
in its match clause. After that entity is removed from any one of the
route-map sequences, any further changes made to that entity doesn't
dynamically take effect.
A reference counter, that allows the named entity to keep a count of
the route-maps dependent on it,  has been introduced to address this issue.

Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
4 years agolib, zebra: Ensure route encoding has enough space
Donald Sharp [Fri, 31 May 2019 12:51:07 +0000 (08:51 -0400)]
lib, zebra: Ensure route encoding has enough space

When you have compiled FRR with a large multipath number
then encoding large ecmp routes between zebra and the
routing daemons.  There exists a theoritical size
of multipath that will cause the encoding to be larger
than the ZEBRA_MAX_PACKET_SIZ.  In the cases where
we have allocated streams that will encode routes
then let's ensure that whatever size we have will
auto-fit what we say we can send.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4434 from donaldsharp/fix_warnings
Mark Stapp [Fri, 31 May 2019 14:10:25 +0000 (10:10 -0400)]
Merge pull request #4434 from donaldsharp/fix_warnings

Fix warnings

4 years agodoc: Add doc for new configure option
Donald Sharp [Tue, 29 Jan 2019 13:54:57 +0000 (08:54 -0500)]
doc: Add doc for new configure option

Add documentation for the '--command-log-always' daemon cli
and how to use it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Add '--command-log-always` to all daemons startup
Donald Sharp [Tue, 8 Jan 2019 13:08:13 +0000 (08:08 -0500)]
lib: Add '--command-log-always` to all daemons startup

Add 'no log commands' cli and at the same time add a
--command-log-always to the daemon startup cli.

If --command-log-always is specified then all commands are
auto-logged and the 'no log commands' form of the command
is now ignored.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: Fix gcc 9 warning -> error issue
Donald Sharp [Fri, 31 May 2019 12:36:37 +0000 (08:36 -0400)]
lib: Fix gcc 9 warning -> error issue

gcc is complaing about this with --enable-dev and --enable-werror:

In function 'nb_log_callback',
    inlined from 'nb_transaction_apply_finish' at lib/northbound.c:1106:4:
lib/northbound.c:777:2: error: '%s' directive argument is null [-Werror=format-overflow=]
  777 |  zlog_debug(
      |  ^~~~~~~~~~~
  778 |   "northbound callback: event [%s] op [%s] xpath [%s] value [%s]",
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  779 |   nb_event_name(event), nb_operation_name(operation), xpath,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  780 |   value);
      |   ~~~~~~
  CC       lib/ringbuf.lo

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: vtypath_default could be overwritten
Donald Sharp [Fri, 31 May 2019 12:18:55 +0000 (08:18 -0400)]
lib: vtypath_default could be overwritten

The vtypath_default variable had a possibility of being overwritten
due to size constraints.  This fixes this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4315 from lkrishnamoor/route_map_3rd_state
Donald Sharp [Fri, 31 May 2019 01:25:18 +0000 (21:25 -0400)]
Merge pull request #4315 from lkrishnamoor/route_map_3rd_state

lib: Introducing a 3rd state for route-map match cmd: RMAP_NOOP

4 years agoMerge pull request #4369 from patrasar/lmqc_lmqt
Donald Sharp [Fri, 31 May 2019 01:23:11 +0000 (21:23 -0400)]
Merge pull request #4369 from patrasar/lmqc_lmqt

pimd: new cli to configure last-member-query-count & last-member-quer…

4 years agoMerge pull request #4400 from LabNConsulting/working/master/centos7-doc
Donald Sharp [Fri, 31 May 2019 01:22:12 +0000 (21:22 -0400)]
Merge pull request #4400 from LabNConsulting/working/master/centos7-doc

fix centos7 build - set SPHINXBUILD to match centos7 yum installed package

4 years agoMerge pull request #4426 from mjstapp/fix_memstats_cli
Donald Sharp [Fri, 31 May 2019 01:21:32 +0000 (21:21 -0400)]
Merge pull request #4426 from mjstapp/fix_memstats_cli

lib, vtysh: make 'debug memstats' work via vtysh

4 years agoMerge pull request #4427 from mjstapp/fix_topo_memleak
Donald Sharp [Fri, 31 May 2019 01:20:24 +0000 (21:20 -0400)]
Merge pull request #4427 from mjstapp/fix_topo_memleak

doc: clean up memleak section of topotests doc

4 years agolib, vtysh: make debug memstats work in vtysh
Mark Stapp [Thu, 30 May 2019 20:14:25 +0000 (16:14 -0400)]
lib, vtysh: make debug memstats work in vtysh

Allow vtysh to send the 'debug memstats-on-exit' command
to the running daemons.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: Introducing a 3rd state for route-map match cmd: RMAP_NOOP
Lakshman Krishnamoorthy [Wed, 29 May 2019 21:32:08 +0000 (14:32 -0700)]
lib: Introducing a 3rd state for route-map match cmd: RMAP_NOOP

Introducing a 3rd state for route_map_apply library function: RMAP_NOOP

Traditionally route map MATCH rule apis  were designed to return
a binary response, consisting of either RMAP_MATCH or RMAP_NOMATCH.
(Route-map SET rule apis return RMAP_OKAY or RMAP_ERROR).
Depending on this response, the following statemachine decided the
course of action:

Action: Apply route-map match and return the result (RMAP_MATCH/RMAP_NOMATCH)
State1: Receveived RMAP_MATCH
THEN: If Routemap type is PERMIT, execute other rules if applicable,
otherwise we PERMIT!
Else: If Routemap type is DENY, we DENYMATCH right away

State2: Received RMAP_NOMATCH, continue on to next route-map, otherwise,
return DENYMATCH by default if nothing matched.

With reference to PR 4078 (https://github.com/FRRouting/frr/pull/4078),
we require a 3rd state because of the following situation:

The issue - what if, the rule api needs to abort or ignore a rule?:
"match evpn vni xx" route-map filter can be applied to incoming routes
regardless of whether the tunnel type is vxlan or mpls.
This rule should be N/A for mpls based evpn route, but applicable to only
vxlan based evpn route.

Today, the filter produces either a match or nomatch response regardless of
whether it is mpls/vxlan, resulting in either permitting or denying the
route.. So an mpls evpn route may get filtered out incorrectly.
Eg: "route-map RM1 permit 10 ; match evpn vni 20" or
"route-map RM2 deny 20 ; match vni 20"

With the introduction of the 3rd state, we can abort this rule check safely.
How? The rules api can now return RMAP_NOOP (or another enum) to indicate
that it encountered an invalid check, and needs to abort just that rule,
but continue with other rules.

Question: Do we repurpose an existing enum RMAP_OKAY or RMAP_ERROR
as the 3rd state (or create a new enum like RMAP_NOOP)?
RMAP_OKAY and RMAP_ERROR are used to return the result of set cmd.

We chose to go with RMAP_NOOP (but open to ideas),
as a way to bypass the rmap filter

As a result we have a 3rd state:
State3: Received RMAP_NOOP
Then, proceed to other route-map, otherwise return RMAP_PERMITMATCH by default.

Signed-off-by:Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>

4 years agoMerge pull request #4413 from donaldsharp/bgp_distance_comes_closer
Sri Mohana Singamsetty [Thu, 30 May 2019 16:45:43 +0000 (09:45 -0700)]
Merge pull request #4413 from donaldsharp/bgp_distance_comes_closer

Bgp distance comes closer

4 years agoMerge pull request #4410 from donaldsharp/invalid
Mark Stapp [Thu, 30 May 2019 15:32:48 +0000 (11:32 -0400)]
Merge pull request #4410 from donaldsharp/invalid

doc: Fix doc showing command that does not exist

4 years agopimd: new cli to configure last-member-query-count & last-member-query-interval
Sarita Patra [Mon, 20 May 2019 17:40:12 +0000 (10:40 -0700)]
pimd: new cli to configure last-member-query-count & last-member-query-interval

Introduce new cli commands ip igmp last-member-query-count <1-7>
ip igmp last-member-query-interval <1-255> deciseconds.

Display the config in show running config and show ip igmp interface

Signed-off-by: Sarita Patra <saritap@vmware.com>
4 years agoMerge pull request #4408 from donaldsharp/bgp_status_fsm
Sri Mohana Singamsetty [Thu, 30 May 2019 03:00:57 +0000 (20:00 -0700)]
Merge pull request #4408 from donaldsharp/bgp_status_fsm

bgpd: Update an fsm debug message

4 years agoMerge pull request #4393 from donaldsharp/debug_all
Renato Westphal [Thu, 30 May 2019 02:55:50 +0000 (23:55 -0300)]
Merge pull request #4393 from donaldsharp/debug_all

Debug all

4 years agoMerge pull request #4267 from qlyoung/fix-misc-compile-warnings
Renato Westphal [Thu, 30 May 2019 02:55:17 +0000 (23:55 -0300)]
Merge pull request #4267 from qlyoung/fix-misc-compile-warnings

Fix misc compile warnings, remove strcpy & strcat

4 years agoMerge pull request #4402 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Wed, 29 May 2019 19:44:41 +0000 (12:44 -0700)]
Merge pull request #4402 from chiragshah6/evpn_dev1

bgpd: fix debug to have proper nhop display

4 years agoMerge pull request #4415 from mjstapp/dplane_dist_setters
Donald Sharp [Wed, 29 May 2019 19:39:27 +0000 (15:39 -0400)]
Merge pull request #4415 from mjstapp/dplane_dist_setters

zebra: add setters for distance, instance

4 years agoMerge pull request #4351 from patrasar/pim_show_ip_mroute_summary
Donald Sharp [Wed, 29 May 2019 19:38:47 +0000 (15:38 -0400)]
Merge pull request #4351 from patrasar/pim_show_ip_mroute_summary

pimd: new cli command show ip mroute summary

4 years agozebra: Move multicast mode to being a property of the router
Donald Sharp [Fri, 15 Feb 2019 14:06:58 +0000 (09:06 -0500)]
zebra: Move multicast mode to being a property of the router

The multicast mode enum was a global static in zebra_rib.c
it does not belong there, it belongs in zebra_router, moving.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib: fix helpstring truncation
Quentin Young [Tue, 28 May 2019 20:25:45 +0000 (20:25 +0000)]
lib: fix helpstring truncation

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agobgpd: use XCALLOC to allocate string buf
Quentin Young [Fri, 17 May 2019 00:08:21 +0000 (00:08 +0000)]
bgpd: use XCALLOC to allocate string buf

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>