]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
5 years agozebra,pbrd: Update pbrd to handle NHT properly 4493/head
Stephen Worley [Mon, 10 Jun 2019 04:39:40 +0000 (00:39 -0400)]
zebra,pbrd: Update pbrd to handle NHT properly

Update pbrd to properly handle nexthop tracking.

When we get a notification that a change happened on a nexthop,
re-install it if its still valid.

Before, we were running over all routes and re-queueing them if they
were PBR routes. This commit removes that and puts all the processing
in PBR instead.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agopbrd: Set next/prev to NULL on cached nexthops
Stephen Worley [Mon, 10 Jun 2019 04:36:59 +0000 (00:36 -0400)]
pbrd: Set next/prev to NULL on cached nexthops

When we copy a new nexthop to cache and track, set its
next and prev pointers to NULL. We don't want those since
this is to be treated as a single nexthop.Other nexthops that
aren't in a group could hash to this nexthop so it doesn't
make sense to keep those pointers in the cache.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #4488 from donaldsharp/pim_solo
Mark Stapp [Mon, 10 Jun 2019 15:30:01 +0000 (11:30 -0400)]
Merge pull request #4488 from donaldsharp/pim_solo

Pim solo

5 years agoMerge pull request #4492 from dslicenc/bgp-l2vpn-parse
Mark Stapp [Mon, 10 Jun 2019 15:28:58 +0000 (11:28 -0400)]
Merge pull request #4492 from dslicenc/bgp-l2vpn-parse

bgpd: add l2vpn evpn to afi safi parse utility

5 years agobgpd: add l2vpn evpn to afi safi parse utility 4492/head
Don Slice [Mon, 10 Jun 2019 12:48:36 +0000 (05:48 -0700)]
bgpd: add l2vpn evpn to afi safi parse utility

Problem reported with "clear bgp l2vpn evpn * soft" clearing the
wrong afi/safi (cleared ipv6 unicast instead).  Determined that
the calling function used the argv_find_and_parse_afi/safi routines
to determine the correct afi/safi to pass on.  Since l2vpn/evpn were
missing from the lookup, the command defaulted to ipv6 unicast.  This
fix just adds that afi/safi to the lookup routine.

Ticket: CM-25167
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #4484 from donaldsharp/pbr_tab_complete
Renato Westphal [Sat, 8 Jun 2019 00:48:53 +0000 (21:48 -0300)]
Merge pull request #4484 from donaldsharp/pbr_tab_complete

Pbr tab complete

5 years agopimd: Remove unnecessary boolean to pim_rpf_update 4488/head
Donald Sharp [Thu, 2 May 2019 22:25:57 +0000 (18:25 -0400)]
pimd: Remove unnecessary boolean to pim_rpf_update

We already log whether or not we add nht tracking, having
an additional boolean to say to log another line is
a bit over the top.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4480 from opensourcerouting/inet_ntop
Quentin Young [Fri, 7 Jun 2019 15:23:16 +0000 (11:23 -0400)]
Merge pull request #4480 from opensourcerouting/inet_ntop

inet_ntop but faster

5 years agoMerge pull request #4486 from idryzhov/master
Donald Sharp [Fri, 7 Jun 2019 14:32:03 +0000 (10:32 -0400)]
Merge pull request #4486 from idryzhov/master

eigrpd: fix invalid command definitions

5 years agoeigrpd: fix invalid command definitions 4486/head
Igor Ryzhov [Fri, 7 Jun 2019 13:21:17 +0000 (16:21 +0300)]
eigrpd: fix invalid command definitions

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
5 years agoMerge pull request #4449 from opensourcerouting/py-detect
Donald Sharp [Fri, 7 Jun 2019 11:19:35 +0000 (07:19 -0400)]
Merge pull request #4449 from opensourcerouting/py-detect

build: refactor & revamp python autoconf logic

5 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

5 years agotests: exercise frr_inet_ntop() 4480/head
David Lamparter [Thu, 6 Jun 2019 17:35:03 +0000 (19:35 +0200)]
tests: exercise frr_inet_ntop()

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: add optimized inet_ntop()
David Lamparter [Thu, 6 Jun 2019 17:10:29 +0000 (19:10 +0200)]
lib: add optimized inet_ntop()

This commit is brought to you by: "Manuel - Gas Gas Gas" (Initial D)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: add OPTIMIZE + assume() to compiler.h
David Lamparter [Thu, 6 Jun 2019 16:51:32 +0000 (18:51 +0200)]
lib: add OPTIMIZE + assume() to compiler.h

Signed-off-by: David Lamparter <equinox@diac24.net>
5 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

5 years agotests: Add ip6_route_zebra lib function 4428/head
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>
5 years agolib,bgpd,babeld,ripngd,nhrpd,bfdd: clean up SA warnings 4457/head
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>
5 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

5 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 …

5 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

5 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

5 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

5 years agopbrd: Allow autocompletion for pbr-map PBRMAP 4484/head
Donald Sharp [Wed, 5 Jun 2019 10:51:08 +0000 (06:51 -0400)]
pbrd: Allow autocompletion for pbr-map PBRMAP

Allow the end user to auto-complete the pbr-map name.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib, pbrd, sharpd, vtysh: Add autocompletion for 'nexthop-group'
Donald Sharp [Wed, 5 Jun 2019 10:33:00 +0000 (06:33 -0400)]
lib, pbrd, sharpd, vtysh: Add autocompletion for 'nexthop-group'

Add some auto-completion for the nexthop-group command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobfdd: Modify bfdd to quietly accept access-lists 4459/head
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>
5 years agoisisd: The RFC states that v6 addresses are limited to 16 in a hello packet 4468/head
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>
5 years agodoc: Update the documentation to reflect -N changes 4431/head
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>
5 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>
5 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++

5 years agotopotests: test bgp ipv6 vrf lite unnumbered with ipv6 rt advertisements 4370/head
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>
5 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>
5 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>
5 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>
5 years agoworkflow: document current C++ approach 4456/head
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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 years agobuild: refactor & revamp python autoconf logic 4449/head
David Lamparter [Mon, 27 May 2019 22:35:24 +0000 (00:35 +0200)]
build: refactor & revamp python autoconf logic

Signed-off-by: David Lamparter <equinox@diac24.net>
5 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

5 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…

5 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

5 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

5 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

5 years agoRevert of PR 4078 and PR 4315 4455/head
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>
5 years agozebra: When displaying `show evpn arp-cache vni XX` add local and remote seq 4454/head
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>
5 years agobgpd: Remove BGP_OPT_CONFIG_CISCO 4453/head
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>
5 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>
5 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>
5 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>
5 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

5 years agodoc: add some printfrr() docs 4333/head
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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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

5 years agodoc: Update pim docs for `clear ip mroute [vrf NAME] count` command 4452/head
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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 years agolib: Cleanup recent commit warn->werror issues in lib/routemap.c 4451/head
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>
5 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>
5 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>
5 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>
5 years agopimd: Convert strncpy to strlcpy in pim_cmd.c 4447/head
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.

5 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

5 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

5 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

5 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.

5 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>
5 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

5 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.

5 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

5 years agozebra: the route nexthop interfaces per vrf were not displayed ok 4445/head
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>
5 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

5 years agodoc: add libtool note 4442/head
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>
5 years agotools: On shutdown no need to flush from tools/frr.in script 4436/head
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>
5 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

5 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

5 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>
5 years agolib: crash when FRR hostname length > 80 chars 4430/head
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>
5 years agobgpd: Filtering received EVPN routes based on VNI does not work 4078/head
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>
5 years agolib: Changes made to dependencies of a r-map do not take effect. 4345/head
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>
5 years agolib, zebra: Ensure route encoding has enough space 4435/head
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>
5 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

5 years agodoc: Add doc for new configure option 3581/head
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>
5 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>
5 years agolib: Fix gcc 9 warning -> error issue 4434/head
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>
5 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>
5 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

5 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…

5 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