]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #3775 from pguibert6WIND/ospf_missing_interface_handling_2
Donald Sharp [Sat, 22 Jun 2019 17:35:45 +0000 (13:35 -0400)]
Merge pull request #3775 from pguibert6WIND/ospf_missing_interface_handling_2

Ospf missing interface handling 2

5 years agoMerge pull request #4294 from adharkar/frr-master-fpm_rmac
Donald Sharp [Sat, 22 Jun 2019 17:28:49 +0000 (13:28 -0400)]
Merge pull request #4294 from adharkar/frr-master-fpm_rmac

Zebra: EVPN remote RMAC download via FPM channel using netlink msg format

5 years agoMerge pull request #4586 from donaldsharp/default_originate
Renato Westphal [Sat, 22 Jun 2019 14:29:18 +0000 (11:29 -0300)]
Merge pull request #4586 from donaldsharp/default_originate

bgpd: `neighbor X:X::X default-originate` complains about (null)

5 years agoMerge pull request #4589 from ton31337/fix/match_ip_next_hop_type_allows_without_args
Donald Sharp [Sat, 22 Jun 2019 11:05:30 +0000 (07:05 -0400)]
Merge pull request #4589 from ton31337/fix/match_ip_next_hop_type_allows_without_args

doc: Correct some comments and CLI helper for `match ip[v6] next-hop type`

5 years agormap: Minor changes in comments regarding match ip[v6] next-hop type
Donatas Abraitis [Sat, 22 Jun 2019 06:30:44 +0000 (09:30 +0300)]
rmap: Minor changes in comments regarding match ip[v6] next-hop type

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agormap: Modify cli helper text for `match_ipv6_next_hop_type_cmd`
Donatas Abraitis [Sat, 22 Jun 2019 06:29:19 +0000 (09:29 +0300)]
rmap: Modify cli helper text for `match_ipv6_next_hop_type_cmd`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #4331 from patrasar/bgp_cli_fix
Donald Sharp [Fri, 21 Jun 2019 23:42:19 +0000 (19:42 -0400)]
Merge pull request #4331 from patrasar/bgp_cli_fix

bgpd : add prefix-length in show ip bgp neighbor advertised routes key

5 years agoMerge pull request #4536 from pguibert6WIND/bfd_startup_does_not_work
Donald Sharp [Fri, 21 Jun 2019 23:41:02 +0000 (19:41 -0400)]
Merge pull request #4536 from pguibert6WIND/bfd_startup_does_not_work

bfdd: avoid double socket initialisation on same netns

5 years agoMerge pull request #4262 from vishaldhingra/lcomm_1
Donald Sharp [Fri, 21 Jun 2019 23:35:47 +0000 (19:35 -0400)]
Merge pull request #4262 from vishaldhingra/lcomm_1

bgpd : Support for exact-match in match clause for lcommunity

5 years agoMerge pull request #4518 from sarav511/dr_lhr
Donald Sharp [Fri, 21 Jun 2019 23:33:14 +0000 (19:33 -0400)]
Merge pull request #4518 from sarav511/dr_lhr

pimd: fix DR at LHR scenario where non DR is connected to RP

5 years agoMerge pull request #4585 from ton31337/fix/no_match_ip_next_hop_blackhole
Donald Sharp [Fri, 21 Jun 2019 22:41:40 +0000 (18:41 -0400)]
Merge pull request #4585 from ton31337/fix/no_match_ip_next_hop_blackhole

 rmap: Add hooks into zebra,ospf,rip for `match ip next-hop type blackhole`

5 years agoMerge pull request #4508 from kssoman/updgrp
Donald Sharp [Fri, 21 Jun 2019 22:33:13 +0000 (18:33 -0400)]
Merge pull request #4508 from kssoman/updgrp

bgpd: Process core when prefix list is applied

5 years agormap: Add hooks into zebra,ospf,rip for `match ip next-hop type blackhole`
Donatas Abraitis [Fri, 21 Jun 2019 15:51:33 +0000 (18:51 +0300)]
rmap: Add hooks into zebra,ospf,rip for `match ip next-hop type blackhole`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #4583 from donaldsharp/no_pim_trace_detail
Mark Stapp [Fri, 21 Jun 2019 19:46:53 +0000 (15:46 -0400)]
Merge pull request #4583 from donaldsharp/no_pim_trace_detail

pimd: Remove output of `debug igmp trace detail` from show commands

5 years agoPrefix list count (#4578)
David Lamparter [Fri, 21 Jun 2019 14:40:30 +0000 (16:40 +0200)]
Prefix list count (#4578)

Prefix list count

Co-authored-by: null <visakha.erina@broadcom.com>
5 years agoMerge pull request #4579 from opensourcerouting/mtype-fix
Donald Sharp [Fri, 21 Jun 2019 14:11:51 +0000 (10:11 -0400)]
Merge pull request #4579 from opensourcerouting/mtype-fix

lib: fix MTYPE alias on clang

5 years agolib: fix MTYPE alias on clang
David Lamparter [Fri, 21 Jun 2019 12:50:56 +0000 (14:50 +0200)]
lib: fix MTYPE alias on clang

This is probably a compiler bug :/

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agoMerge pull request #4576 from sarav511/enc_addr
Donald Sharp [Fri, 21 Jun 2019 12:21:03 +0000 (08:21 -0400)]
Merge pull request #4576 from sarav511/enc_addr

pimd: Fixing encoded group & source address packing in right byte order

5 years agoMerge pull request #4573 from opensourcerouting/mtype_cleanup
Donald Sharp [Fri, 21 Jun 2019 11:40:27 +0000 (07:40 -0400)]
Merge pull request #4573 from opensourcerouting/mtype_cleanup

MTYPE cleanup pass

5 years agobfdd: avoid double socket initialisation on same netns
Philippe Guibert [Mon, 17 Jun 2019 13:17:20 +0000 (15:17 +0200)]
bfdd: avoid double socket initialisation on same netns

when working with a standard vrf backend, bfdd ignores that and tries to
create and configure bfd sockets for each vrf, which will fail for the
second vrf discovered, since the network namespace used is the same, and
it is not possible to use same socket settings twice. Handle this case,
and avoids to reinitialise sockets.
This patch however does not leverage bfd support for vrf-lite.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #4531 from donaldsharp/repeaty_mcrepeat
David Lamparter [Fri, 21 Jun 2019 07:05:27 +0000 (09:05 +0200)]
Merge pull request #4531 from donaldsharp/repeaty_mcrepeat

zebra: Handle 5549 neighbor entry failure state

5 years agoMerge pull request #4568 from qlyoung/debian-docker-cleanup
David Lamparter [Fri, 21 Jun 2019 07:04:47 +0000 (09:04 +0200)]
Merge pull request #4568 from qlyoung/debian-docker-cleanup

docker: cleanup Debian docker build

5 years agoMerge pull request #4567 from sworleys/DOC-Fedora-IPtables
David Lamparter [Fri, 21 Jun 2019 07:02:38 +0000 (09:02 +0200)]
Merge pull request #4567 from sworleys/DOC-Fedora-IPtables

doc: Add firewalld notice in fedora

5 years agoripngd: use MTYPE_STATIC
David Lamparter [Fri, 21 Jun 2019 06:44:11 +0000 (08:44 +0200)]
ripngd: use MTYPE_STATIC

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agoripd: use MTYPE_STATIC
David Lamparter [Fri, 21 Jun 2019 06:39:33 +0000 (08:39 +0200)]
ripd: use MTYPE_STATIC

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agovrrpd: use MTYPE_STATIC
David Lamparter [Fri, 21 Jun 2019 06:33:17 +0000 (08:33 +0200)]
vrrpd: use MTYPE_STATIC

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agolib: use MTYPE_STATIC
David Lamparter [Fri, 21 Jun 2019 06:25:42 +0000 (08:25 +0200)]
lib: use MTYPE_STATIC

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobabeld: use MTYPE_STATIC
David Lamparter [Fri, 21 Jun 2019 06:14:58 +0000 (08:14 +0200)]
babeld: use MTYPE_STATIC

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agozebra: use MTYPE_STATIC
David Lamparter [Fri, 21 Jun 2019 06:10:39 +0000 (08:10 +0200)]
zebra: use MTYPE_STATIC

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobfdd: use MTYPE_STATIC
David Lamparter [Fri, 21 Jun 2019 06:04:57 +0000 (08:04 +0200)]
bfdd: use MTYPE_STATIC

MTYPE definitions should be local to the file using them whereever
possible.  Also remove some superfluous ;

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agolib: improve MTYPE definitions
David Lamparter [Wed, 19 Jun 2019 06:16:22 +0000 (08:16 +0200)]
lib: improve MTYPE definitions

The "static struct mtype * const MTYPE_FOO" doesn't quite make a
"constant" that is usable for initializers.  An 1-element array works
better.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agopimd: Fixing encoded group & source address packing in right byte order
saravanank [Fri, 21 Jun 2019 03:48:55 +0000 (20:48 -0700)]
pimd: Fixing encoded group & source address packing in right byte order

Position of address family and encoding type is defined wrongly in the
packed structure. This will correct the position as per RFC 4601 4.9.1

Signed-off-by: Saravanan K <saravanank@vmware.com>
5 years agoMerge pull request #4545 from nitinsoniism/show_evpn_mac_vni_seq_number
Sri Mohana Singamsetty [Thu, 20 Jun 2019 23:19:24 +0000 (16:19 -0700)]
Merge pull request #4545 from nitinsoniism/show_evpn_mac_vni_seq_number

zebra: When displaying `show evpn mac vni XX` add local and remote seq

5 years agoMerge pull request #4470 from donaldsharp/bgp_mac_rescan
Sri Mohana Singamsetty [Thu, 20 Jun 2019 20:33:09 +0000 (13:33 -0700)]
Merge pull request #4470 from donaldsharp/bgp_mac_rescan

Bgp mac rescan

5 years agoMerge pull request #4549 from donaldsharp/multiple_instance
Sri Mohana Singamsetty [Thu, 20 Jun 2019 20:32:34 +0000 (13:32 -0700)]
Merge pull request #4549 from donaldsharp/multiple_instance

Multiple instance

5 years agoMerge pull request #4559 from mjstapp/fix_topotest_vrf_mdev
Quentin Young [Thu, 20 Jun 2019 17:38:06 +0000 (13:38 -0400)]
Merge pull request #4559 from mjstapp/fix_topotest_vrf_mdev

topotest: configure l3mdev_accept for a range of kernels

5 years agodocker: cleanup Debian docker build
Quentin Young [Thu, 20 Jun 2019 16:59:26 +0000 (16:59 +0000)]
docker: cleanup Debian docker build

* Update build instructions
* Remove manually installed daemons file

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: Add firewalld notice in fedora
Stephen Worley [Thu, 20 Jun 2019 15:38:43 +0000 (11:38 -0400)]
doc: Add firewalld notice in fedora

Add a note in the fedora build guide on how to disable
firewalld and clear iptables that come by default.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agobgpd: `neighbor X:X::X default-originate` complains about (null)
Donald Sharp [Thu, 20 Jun 2019 15:12:35 +0000 (11:12 -0400)]
bgpd: `neighbor X:X::X default-originate` complains about (null)

The `neighbor X:X::X default-originate command is complaining
that:
The route-map '(null)' does not exist.

Upon inspection of the code we were passing a NULL
string to the lookup.  Testing for null gets us this:

donna.cumulusnetworks.com# conf t
donna.cumulusnetworks.com(config)# router bgp 99
donna.cumulusnetworks.com(config-router)# neighbor 2001:1::1:2 remote-as 99
donna.cumulusnetworks.com(config-router)# neighbor 2001:1::1:2 default-originate
donna.cumulusnetworks.com(config-router)# end
donna.cumulusnetworks.com# show run
Building configuration...

Current configuration:
!
frr version 7.2-dev
frr defaults datacenter
hostname donna.cumulusnetworks.com
log stdout
no ipv6 forwarding
!
ip route 4.5.6.7/32 10.50.11.4
!
router bgp 99
 neighbor 2001:1::1:2 remote-as 99
 !
 address-family ipv4 unicast
  neighbor 2001:1::1:2 default-originate

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Remove output of `debug igmp trace detail` from show commands
Donald Sharp [Thu, 20 Jun 2019 08:37:57 +0000 (04:37 -0400)]
pimd: Remove output of `debug igmp trace detail` from show commands

There has never been a `debug igmp trace detail` but we have
had code to display this when we had the appropriate flags
set.  Since we never can accept this, let's remove this.

This showed up because of commit:0ab16492d2d9fcc6cba7e001227deed6765ed261

where we re-arranged some debugs to combine them being turned on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc: Cleanup `clear ip prefix-list...` documentation.
Donald Sharp [Thu, 20 Jun 2019 05:49:46 +0000 (01:49 -0400)]
doc: Cleanup `clear ip prefix-list...` documentation.

The documentation was a tiny bit odd.  Clean it up to
be a bit better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Keep proper count of prefix-list hit-count when used
Visakha Erina [Wed, 19 Jun 2019 13:38:31 +0000 (06:38 -0700)]
lib: Keep proper count of prefix-list hit-count when used

When a prefix-list is applied to a BGP neighbor to deny the learning
of specific routes, the hit count is showing 0 for BGP even though
the routes are being filtered correctly due
to the configured prefix-list.

Before fix:

c1# show ip prefix-list nag seq 10
ZEBRA: seq 10 permit any (hit count: 0, refcount: 0)
BGP: seq 10 permit any (hit count: 0, refcount: 0)
c1# show ip prefix-list nag seq 5
ZEBRA: seq 5 deny 1.0.1.0/24 (hit count: 0, refcount: 0)
BGP: seq 5 deny 1.0.1.0/24 (hit count: 0, refcount: 0)

Fix: Increment the prefix-list's hit count whenever a rule match occurs.

After Fix:

c1# show ip prefix-list nag seq 10
ZEBRA: seq 10 permit any (hit count: 0, refcount: 0)
BGP: seq 10 permit any (hit count: 6, refcount: 0)
c1# show ip prefix-list nag seq 5
ZEBRA: seq 5 deny 1.0.1.0/24 (hit count: 0, refcount: 0)
BGP: seq 5 deny 1.0.1.0/24 (hit count: 1, refcount: 0)

Signed-off-by: Visakha Erina visakha.erina@broadcom.com
5 years agotopotest: configure l3mdev_accept for a range of kernels
Mark Stapp [Wed, 19 Jun 2019 18:55:48 +0000 (14:55 -0400)]
topotest: configure l3mdev_accept for a range of kernels

Improve vrf support in the l3vpn topotest by configuring
l3mdev_accept for a range of kernels.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4557 from dslicenc/zebra_rnh_eval
Mark Stapp [Wed, 19 Jun 2019 16:14:13 +0000 (12:14 -0400)]
Merge pull request #4557 from dslicenc/zebra_rnh_eval

zebra: resolve issue with rnh not evaluating nexhops correctly

5 years agozebra: resolve issue with rnh not evaluating nexhops correctly
Don Slice [Wed, 19 Jun 2019 11:22:21 +0000 (11:22 +0000)]
zebra: resolve issue with rnh not evaluating nexhops correctly

Problem discovered in testing that occasionally when an interface
address was flushed, the corresponding route would be removed from
the kernel and zebra but remain in the bgp table and be advertised
to peers.  Discovered that when zebra_rib_evaluate_nexthops spun
thru the tree list of rns, if the timing and circumstances were
right, it would move elements and miss evaluating some.  Changed
from frr_each to frr_each_safe and the problem is now gone.

Ticket: CM-25301
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #4554 from donaldsharp/nht_improved_debugging
Mark Stapp [Wed, 19 Jun 2019 13:02:26 +0000 (09:02 -0400)]
Merge pull request #4554 from donaldsharp/nht_improved_debugging

zebra: Display a bit better debugging for rnh tracking

5 years agoMerge pull request #4553 from qlyoung/readme-add-vrrp
Mark Stapp [Wed, 19 Jun 2019 12:39:18 +0000 (08:39 -0400)]
Merge pull request #4553 from qlyoung/readme-add-vrrp

README.md: add VRRP to list of protocols

5 years agobgpd : Support for exact-match in match clause for lcommunity
vishaldhingra [Mon, 6 May 2019 10:59:19 +0000 (03:59 -0700)]
bgpd : Support for exact-match in match clause for lcommunity

FRR has a provision to give exact-match in match clause for
standard community, but this option is missing for lcommunity.

Part 3 : show related changes for match clause

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
5 years agobgpd : Support for exact-match in match clause for lcommunity
vishaldhingra [Mon, 6 May 2019 09:45:32 +0000 (02:45 -0700)]
bgpd : Support for exact-match in match clause for lcommunity

FRR has a provision to give exact-match in match clause for
standard community, but this option is missing for lcommunity.

Part 2 : CLI related changes for match clause

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
5 years agobgpd : Support for exact-match in match clause for lcommunity
vishaldhingra [Mon, 6 May 2019 06:09:08 +0000 (23:09 -0700)]
bgpd : Support for exact-match in match clause for lcommunity

FRR has a provision to give exact-match in match clause for
standard community, but this option is missing for lcommunity.

Part 1 : Added support in clist lib

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
5 years agoMerge pull request #4260 from vishaldhingra/lcomm
Donald Sharp [Wed, 19 Jun 2019 00:45:57 +0000 (20:45 -0400)]
Merge pull request #4260 from vishaldhingra/lcomm

bgpd: Added the as-set option for IPV6 agg. route

5 years agozebra: Display a bit better debugging for rnh tracking
Donald Sharp [Tue, 18 Jun 2019 19:47:10 +0000 (15:47 -0400)]
zebra: Display a bit better debugging for rnh tracking

Add a expected count for the route node we will be processing
as part of nexthop resolution and modify the type to display
a useful string of what the type is instead of a number.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4495 from donaldsharp/pim_debug_expiry
Russ White [Tue, 18 Jun 2019 15:31:02 +0000 (11:31 -0400)]
Merge pull request #4495 from donaldsharp/pim_debug_expiry

pimd: Add a debug to indicate the ifchannel expiry timer has popped

5 years agoMerge pull request #4300 from adharkar/frr-master-rmap_debug
Donald Sharp [Tue, 18 Jun 2019 15:24:10 +0000 (11:24 -0400)]
Merge pull request #4300 from adharkar/frr-master-rmap_debug

Lib: Debugs for route-map code in FRR

5 years agoMerge pull request #4513 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Tue, 18 Jun 2019 14:10:05 +0000 (07:10 -0700)]
Merge pull request #4513 from chiragshah6/evpn_dev1

bgpd: skip evpn remove marked routes from rescan

5 years agoMerge pull request #4543 from donaldsharp/mac_hash_string_leak
Russ White [Tue, 18 Jun 2019 14:07:58 +0000 (10:07 -0400)]
Merge pull request #4543 from donaldsharp/mac_hash_string_leak

bgpd: Fix memleak of Mac Hash String upon insertion

5 years agoMerge pull request #4546 from donaldsharp/better_debugs
Russ White [Tue, 18 Jun 2019 14:06:54 +0000 (10:06 -0400)]
Merge pull request #4546 from donaldsharp/better_debugs

zebra: Increase debugs to understand why we rejected a kernel route

5 years agotests: Remove `bgp multiple-instance` command from topotests
Donald Sharp [Tue, 18 Jun 2019 13:32:18 +0000 (09:32 -0400)]
tests: Remove `bgp multiple-instance` command from topotests

The `bgp multiple-instance` command has been deprecated and
removed.  Finish off this by removing it from topotests too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc: Update documentation about multiple-instance
Donald Sharp [Tue, 18 Jun 2019 13:30:10 +0000 (09:30 -0400)]
doc: Update documentation about multiple-instance

The `bgp multiple-instance` command has been removed but
we did not properly update the documentation.  Let's do so.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: BGP_ERR_MULTIPLE_INSTANCE_NOT_SET is an impossible condition
Donald Sharp [Tue, 18 Jun 2019 13:21:49 +0000 (09:21 -0400)]
bgpd: BGP_ERR_MULTIPLE_INSTANCE_NOT_SET is an impossible condition

This code is not returned anywhere in the system as that bgp
is by default multiple-instance 'only' now.  So remove
the last remaining bits of it from the code base.

Remove BGP_ERR_MULTIPLE_INSTANCE_USED too.

Make bgp_get explicitly return BGP_SUCCESS
instead of 0.

Remove the multi-instance error code too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Remove unused count variable in mac_rescan_table function
Donald Sharp [Thu, 6 Jun 2019 01:03:10 +0000 (21:03 -0400)]
bgpd: Remove unused count variable in mac_rescan_table function

The variable count was being incremented but never used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Fix crash when rd has no data
Donald Sharp [Thu, 6 Jun 2019 00:59:02 +0000 (20:59 -0400)]
bgpd: Fix crash when rd has no data

There exists a state where we may have a rd node but no individual
evpn prefix nodes in the two level table:

(gdb) bt
    at bgpd/bgp_evpn_vty.c:1190
    filter=FILTER_RELAXED) at lib/command.c:1060
    at lib/command.c:1119
    vtysh=vtysh@entry=0) at lib/command.c:1273
(gdb) f 5
    at bgpd/bgp_evpn_vty.c:1190
1190    bgpd/bgp_evpn_vty.c: No such file or directory.
(gdb) p buf
$1 = "[2]:[0]:[48]:[00:00:00:00:00:00]", '\000' <repeats 240 times>...
(gdb) p json_nroute
$2 = (json_object *) 0x0
(gdb) p rd_header
$3 = 1
(gdb) p buf
$4 = "[2]:[0]:[48]:[00:00:00:00:00:00]", '\000' <repeats 240 times>...
(gdb)

I'm not entirely sure that this is not a `different` problem in that the
rd node should have been removed.  But I think preventing the crash
in a show command is probably the right thing to do here.

Fixes: #4501
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Mac rescan on interface up/down efficency improvements
Donald Sharp [Thu, 6 Jun 2019 00:53:01 +0000 (20:53 -0400)]
bgpd: Mac rescan on interface up/down efficency improvements

On interface up/down, bgp stores the mac address of the interface
in a bgp_mac_hash table entry and then initiates a rescan
of the evpn l2vpn table.  The problem with this scan is that
it is looking at every item in the table when only 1 mac
has changed.  So every up/down event causes some major trauma
in the bgp_update processing.

Modify the mac scanning such that we know the mac that is changed
and as such we should reprocess those entries only.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Increase debugs to understand why we rejected a kernel route
Donald Sharp [Tue, 18 Jun 2019 12:47:28 +0000 (08:47 -0400)]
zebra: Increase debugs to understand why we rejected a kernel route

Add a bit of extra code to indicate to the operator why
we intentionally rejected a kernel route from being used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4530 from donaldsharp/pim_debugs
Rafael Zalamena [Tue, 18 Jun 2019 11:44:33 +0000 (08:44 -0300)]
Merge pull request #4530 from donaldsharp/pim_debugs

Pim debugs

5 years agozebra: When displaying `show evpn mac vni XX` add local and remote seq
Nitin Soni [Mon, 17 Jun 2019 05:25:53 +0000 (22:25 -0700)]
zebra: When displaying `show evpn mac vni XX` add local and remote seq

Add the local and remote sequence number to the `show evpn mac vni XX`
command.

VNI 1000213 #MACs (local and remote) 2

MAC               Type   Intf/Remote VTEP      VLAN  Seq #'s
00:02:00:00:00:21 local  swp5                  213   0/0
00:02:00:00:00:43 local  vlan213               213   0/0

VNI 1000214 #MACs (local and remote) 2

MAC               Type   Intf/Remote VTEP      VLAN  Seq #'s
00:02:00:00:00:22 local  swp6                  214   0/0
00:02:00:00:00:43 local  vlan214               214   0/0

VNI 1000112 #MACs (local and remote) 5

MAC               Type   Intf/Remote VTEP      VLAN  Seq #'s
00:02:00:00:00:1b remote 6.0.0.2                     0/0
00:02:00:00:00:24 remote 6.0.0.31                    0/0
00:02:00:00:00:17 remote 6.0.0.1                     0/0
00:02:00:00:00:20 local  swp4                  112   0/0
00:02:00:00:00:43 local  vlan112               112   0/0

VNI 1000111 #MACs (local and remote) 5

MAC               Type   Intf/Remote VTEP      VLAN  Seq #'s
00:02:00:00:00:1f local  swp3                  111   0/0
00:02:00:00:00:23 remote 6.0.0.31                    0/0
00:02:00:00:00:16 remote 6.0.0.1                     0/0
00:02:00:00:00:1a remote 6.0.0.2                     0/0
00:02:00:00:00:43 local  vlan111               111   0/0

Ticket: CM-25120
Signed-off-by: Nitin Soni <nsoni@cumulusnetworks.com>
Reviewed-by: CCR-8836
Testing-Done:

5 years agoREADME.md: add VRRP to list of protocols
Quentin Young [Tue, 18 Jun 2019 02:07:07 +0000 (02:07 +0000)]
README.md: add VRRP to list of protocols

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd: Fix memleak of Mac Hash String upon insertion
Donald Sharp [Tue, 18 Jun 2019 00:16:30 +0000 (20:16 -0400)]
bgpd: Fix memleak of Mac Hash String upon insertion

If we get a callback for a interface change but we do not
actually have to move the mac entry in the hash then
we were accidently leaking the Mac Hash String all over
ourselves.  Messy Messy!

Ticket: CM-25351
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4514 from opensourcerouting/warnings-20190612
Donald Sharp [Mon, 17 Jun 2019 19:19:42 +0000 (15:19 -0400)]
Merge pull request #4514 from opensourcerouting/warnings-20190612

*: kill more warnings

5 years agoDocument FRR service manipulation (#4528)
David Lamparter [Mon, 17 Jun 2019 19:16:55 +0000 (21:16 +0200)]
Document FRR service manipulation (#4528)

Document FRR service manipulation

5 years agoZebra: Address review comments for RMAC FPM feature 1
Ameya Dharkar [Mon, 17 Jun 2019 19:03:41 +0000 (12:03 -0700)]
Zebra: Address review comments for RMAC FPM feature 1

Address minor review comments.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years agoZebra: Build nelink message for RMAC updates
Ameya Dharkar [Fri, 17 May 2019 00:29:08 +0000 (17:29 -0700)]
Zebra: Build nelink message for RMAC updates

- Function "zfpm_netlink_encode_mac()" builds a netlink message for RMAC updates.

- To build a netlink message for RMAC updates, we use "ndmsg" in rtlink.

- FPM Message structure is:
  FPM header -> nlmsg header -> ndmsg fields -> ndmsg attributes

- Netlink message will look like:
  {'ndm_type': 0, 'family': 7, '__pad': (), 'header': {'flags': 1281,
   'length':64, 'type': 28, 'pid': 0, 'sequence_number': 0}, 'state': 2,
   'flags': 22, 'attrs': [('NDA_LLADDR', 'b2:66:eb:b9:5b:d3'),
   ('NDA_DST', '10.100.0.2'), ('NDA_MASTER', 11), ('NDA_VNI', 1000)],
   'ifindex': 18}

- Message details:
  nlmsghdr.nlmsg_type = RTM_NEWNEIGH(28) or RTM_DELNEIGH(29)
  nlmsghdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE for "add" ,
    "NLM_F_REQUEST" for delete.
  ndmsg.ndm_family = AF_BRIDGE
  ndmsg.ndm_ifindex = vxlan_if (ifindex)
  ndmsg.ndm_state = NUD_REACHABLE
  ndmsg.ndm_flags |= NTF_SELF | NTF_MASTER | NTF_EXT_LEARNED
  Attribute "NDA_LLADDR" for MAC address
  Attribute "NDA_DST" for remote vtep ip
  Attribute "NDA_MASTER" for bridge interface ifindex.
  Attribute "NDA_VNI" for VNI id.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years agoZebra: Handle FPM connection up/down events
Ameya Dharkar [Thu, 16 May 2019 23:40:19 +0000 (16:40 -0700)]
Zebra: Handle FPM connection up/down events

- When the connection with the FPM socket is established, iterate through all the
  L3VNIs and send all the RMACs for FPM processing zfpm_conn_up_thread_cb"

- We have already handled connection down even in previous commits. When the FPM
  connection goes down, empty mac_q and FPM mac info hash table
  "zfpm_conn_down_thread_cb"

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years agoZebra: FPM processing of mac_q and dest_q
Ameya Dharkar [Thu, 16 May 2019 22:53:46 +0000 (15:53 -0700)]
Zebra: FPM processing of mac_q and dest_q

- FPM write thread calls "zfpm_build_updates()" to process mac_q and dest_q and
  to write update buffer over the FPM socket.

- "zfpm_build_updates()" processes all the update queues one by one in a while
  loop. It will break the while loop and return if Queue processing function
  returns "FPM_WRITE_STOP" OR FPM write buffer is full OR all the queues are
  empty (no more update to process).

- "zfpm_build_route_updates()" dequeues and processes route nodes from "dest_q".

- "zfpm_build_mac_updates()" dequeues and processes MAC nodes from "mac_q"

- These queue processing functions return with "FPM_WRITE_STOP" if the write
  buffer is full. Return value is "FPM_GOTO_NEXT_Q" if enough updates are
  processed from this queue and we want to move on to the next queue.

- In each call, a queue processing function will process max
  "FPM_QUEUE_PROCESS_LIMIT (10000)" updates to avoid starvation of other queues.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years agoZebra: Handle RMAC add/delete operation and add fpm_mac_info_t
Ameya Dharkar [Thu, 16 May 2019 21:43:41 +0000 (14:43 -0700)]
Zebra: Handle RMAC add/delete operation and add fpm_mac_info_t

- Define a hook "zebra_mac_update" which can be registered by multiple
  data plane components (e.g. FPM, dplane).

DEFINE_HOOK(zebra_rmac_update, (zebra_mac_t *rmac, zebra_l3vni_t *zl3vni, bool
    delete, const char *reason), (rmac, zl3vni, delete, reason))

- While performing RMAC add/delete for an L3VNI, call "zebra_mac_update" hook.

- This hook call triggers "zfpm_trigger_rmac_update". In this function, we do a
  lookup for the RMAC in fpm_mac_info_table. If already present, this node is
  updated with the latest RMAC info. Else, a new fpm_mac_info_t node is created
  and inserted in the queue and hash data structures.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years agoZebra: Data structures for RMAC processing in FPM
Ameya Dharkar [Thu, 16 May 2019 20:28:25 +0000 (13:28 -0700)]
Zebra: Data structures for RMAC processing in FPM

- FPM MAC structure: This data structure will contain all the information
required for FPM message generation for an RMAC.

struct fpm_mac_info_t {
struct ethaddr macaddr;
uint32_t zebra_flags; /* Could be used to build FPM messages */
vni_t vni;
ifindex_t vxlan_if;
ifindex_t svi_if; /* L2 or L3 Bridge interface */
struct in_addr r_vtep_ip; /* Remote VTEP IP */
/* Linkage to put MAC on the FPM processing queue. */
TAILQ_ENTRY(fpm_mac_info_t) fpm_mac_q_entries;
uint8_t fpm_flags;
};

- Queue structure for FPM processing:
    For FPM processing, we build a queue of "fpm_mac_info_t". When RMAC is
    added or deleted from zebra, fpm_mac_info_t node is enqueued in this queue
    for the corresponding operation. FPM thread will dequeue these nodes one by
    one to generate a netlink message.

    TAILQ_HEAD(zfpm_mac_q, fpm_mac_info_t) mac_q;

- Hash table for "fpm_mac_info_t"
    When zebra tries to enqueue fpm_mac_info_t for a new RMAC add/delete
    operation, it is possible that this RMAC is already present in the queue. So,
    to avoid multiple messages for duplicate RMAC nodes, insert fpm_mac_info_t
    into a hash table.

    struct hash *fpm_mac_info_table;

    - Before enqueueing any MAC, try to fetch the fpm_mac_info_t from the hash
      table first.
    - Entry is deleted from the hash table when the node is dequeued.
    - For hash table key generation, parameters used are "mac adress" and "vni"
      This will provide a fairly unique key for a MAC(fpm_mac_info_hash_keymake).
    - Compare function uses "mac address", "RVTEP address" and "VNI" as the key
      which is sufficient to distinguish any two RMACs. This compare function is
      used for fpm_mac_info_t lookup (zfpm_mac_info_cmp).

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years agoMerge pull request #4538 from dslicenc/int_vrf_all_brief
Mark Stapp [Mon, 17 Jun 2019 18:46:01 +0000 (14:46 -0400)]
Merge pull request #4538 from dslicenc/int_vrf_all_brief

zebra: add ability to "show interface vrf all brief"

5 years agoMerge pull request #4505 from ton31337/feature/autocomplete_bgp_peer-group
Quentin Young [Mon, 17 Jun 2019 17:53:48 +0000 (13:53 -0400)]
Merge pull request #4505 from ton31337/feature/autocomplete_bgp_peer-group

bgpd: List all groups dynamically for commands with peer-group

5 years agoMerge pull request #4537 from mjstapp/fix_mpls_config_doc
Quentin Young [Mon, 17 Jun 2019 17:52:13 +0000 (13:52 -0400)]
Merge pull request #4537 from mjstapp/fix_mpls_config_doc

doc: add config file name for mpls config

5 years agozebra: add ability to "show interface vrf all brief"
Don Slice [Thu, 13 Jun 2019 11:22:11 +0000 (11:22 +0000)]
zebra: add ability to "show interface vrf all brief"

Found that the "show interface brief" command was missing the
ability to specify all vrfs.   Added that capability via this
fix.

Ticket: CM-25139
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #4517 from chiragshah6/mdev
Sri Mohana Singamsetty [Mon, 17 Jun 2019 17:10:13 +0000 (10:10 -0700)]
Merge pull request #4517 from chiragshah6/mdev

bgpd: show bgp vrfs formatting

5 years agodoc: add service control instructions
Quentin Young [Fri, 14 Jun 2019 17:37:15 +0000 (17:37 +0000)]
doc: add service control instructions

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: add config file name for mpls config
Mark Stapp [Mon, 17 Jun 2019 16:08:06 +0000 (12:08 -0400)]
doc: add config file name for mpls config

We say something about what needs to be configured - but don't
name the file where the change needs to go.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4532 from donaldsharp/fuzzing
Mark Stapp [Mon, 17 Jun 2019 14:11:59 +0000 (10:11 -0400)]
Merge pull request #4532 from donaldsharp/fuzzing

zebra: Fuzzing code has gotten a bit out of date

5 years agobgpd: Added the as-set option for IPV6 agg. route
vishaldhingra [Mon, 6 May 2019 03:57:58 +0000 (20:57 -0700)]
bgpd: Added the as-set option for IPV6 agg. route

FRR has no option for the as-set for aggregate route
under IPV6 address family. Added the command to
configure the as-set option for IPV6.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
5 years agozebra: Fuzzing code has gotten a bit out of date
Donald Sharp [Sat, 15 Jun 2019 12:25:25 +0000 (08:25 -0400)]
zebra: Fuzzing code has gotten a bit out of date

Update the fuzzing code to compile again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Handle 5549 neighbor entry failure state
Donald Sharp [Sat, 15 Jun 2019 01:47:27 +0000 (21:47 -0400)]
zebra: Handle 5549 neighbor entry failure state

If we get a neighbor entry for 5549 failure notice
from the kernel that means that something has probably
gone terribly wrong.  Let's notice and not reinstall.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Add debugs for channel_oil creation and deletion
Donald Sharp [Fri, 14 Jun 2019 23:18:51 +0000 (19:18 -0400)]
pimd: Add debugs for channel_oil creation and deletion

Add some debugs so we can see channel oil creation and deletion
events.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Display ifp name in pim_channel_oil_dump
Donald Sharp [Fri, 14 Jun 2019 23:01:46 +0000 (19:01 -0400)]
pimd: Display ifp name in pim_channel_oil_dump

The vifi being displayed is just confusing.  Display the
actual interface name being used in the mroute.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Prevent infinite loop in fd handling (#4516)
David Lamparter [Fri, 14 Jun 2019 21:48:36 +0000 (23:48 +0200)]
lib: Prevent infinite loop in fd handling (#4516)

lib: Prevent infinite loop in fd handling

5 years agoeliminate snprintf from AF_INET/AF_INET6 prefix2str, add prefix2str test (#4521)
David Lamparter [Fri, 14 Jun 2019 19:48:34 +0000 (21:48 +0200)]
eliminate snprintf from AF_INET/AF_INET6 prefix2str, add prefix2str test (#4521)

eliminate snprintf from AF_INET/AF_INET6 prefix2str, add prefix2str test

5 years agodoc: add vrrpd service line
Quentin Young [Fri, 14 Jun 2019 17:37:00 +0000 (17:37 +0000)]
doc: add vrrpd service line

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4523 from LabNConsulting/working/master/issue4515
David Lamparter [Fri, 14 Jun 2019 16:28:04 +0000 (18:28 +0200)]
Merge pull request #4523 from LabNConsulting/working/master/issue4515

tests/topotests: bgp_l3vpn_to_bgp_vrf address issue #4515

5 years agoMerge pull request #4526 from CHKDSK88/endian
Donald Sharp [Fri, 14 Jun 2019 16:05:41 +0000 (12:05 -0400)]
Merge pull request #4526 from CHKDSK88/endian

eigrpd: Fix endianness issue in packets

5 years agobgpd: show bgp vrfs formatting
Chirag Shah [Tue, 11 Jun 2019 22:06:57 +0000 (15:06 -0700)]
bgpd: show bgp vrfs formatting

show bgp vrfs command is formatted with couple
of things.

show bgp vrfs to inclue bgp vrf instance's
SVI interface.
Move L3vni, RMAC and SVI value in next line.

Ticket:CM-25317
Reviewed By:CCR-8816
Testing Done:

New Output:
TORS1# show bgp vrfs
Type  Id     routerId          #PeersVfg  #PeersEstb  Name
             L3-VNI            RouterMAC              Interface
DFLT  0      27.0.0.15         2          2           default
             0                 00:00:00:00:00:00      unknown
 VRF  31     45.0.8.2          0          0           vrf3
             4003              00:02:00:00:00:4e      vlan4003
 VRF  35     45.0.2.2          0          0           vrf1
             4001              00:02:00:00:00:4e      vlan4001
 VRF  25     45.0.6.2          0          0           vrf2
             4002              00:02:00:00:00:4e      vlan4002

Total number of VRFs (including default): 4

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoeigrpd: Fix endianness issue in packets
Pawel Dembicki [Fri, 14 Jun 2019 10:28:00 +0000 (12:28 +0200)]
eigrpd: Fix endianness issue in packets

Net prefixes in eigrp update packets is created and read
without check host endianness.

This patch use ntohl and htonl to read and write ip prefix
from and to packet.

Tested: x86, powerpc

Signed-off-by: Pawel Dembicki <p.dembicki@wb.com.pl>
5 years agoMerge pull request #4512 from mjstapp/fix_bgp_auto_rid
Sri Mohana Singamsetty [Fri, 14 Jun 2019 00:55:59 +0000 (17:55 -0700)]
Merge pull request #4512 from mjstapp/fix_bgp_auto_rid

bgpd: auto router-id should not change configured vpn RD/RT

5 years agotests/topotests: bgp_l3vpn_to_bgp_vrf double the amount of time to wait during scalin...
Lou Berger [Thu, 13 Jun 2019 21:01:30 +0000 (21:01 +0000)]
tests/topotests: bgp_l3vpn_to_bgp_vrf double the amount of time to wait during scaling tests

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agoMerge pull request #4499 from kssoman/core
Lou Berger [Thu, 13 Jun 2019 20:08:11 +0000 (16:08 -0400)]
Merge pull request #4499 from kssoman/core

bgpd: Process core when bgp instance is deleted

5 years agobgpd, lib: Add iana_afi2str and iana_safi2str for eye pleasing strings (#4439)
David Lamparter [Thu, 13 Jun 2019 20:06:49 +0000 (22:06 +0200)]
bgpd, lib: Add iana_afi2str and iana_safi2str for eye pleasing strings (#4439)

bgpd, lib: Add iana_afi2str and iana_safi2str for eye pleasing strings