]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agodebianpkg, redhat, tools: Fixup startup/build for new daemon
Donald Sharp [Thu, 26 Apr 2018 00:48:17 +0000 (20:48 -0400)]
debianpkg, redhat, tools: Fixup startup/build for new daemon

Add code to allow FRR to properly build and handle the staticd
for some of the more common packaging.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agostaticd: Start the addition of a staticd
Donald Sharp [Tue, 8 May 2018 11:58:32 +0000 (07:58 -0400)]
staticd: Start the addition of a staticd

This is the start of separating out the static
handling code from zebra -> staticd.  This will
help simplify the zebra code and isolate static
route handling to it's own code base.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Allow a static daemon to connect
Donald Sharp [Wed, 18 Apr 2018 18:50:55 +0000 (14:50 -0400)]
zebra: Allow a static daemon to connect

As part of moving the static route handling to it's own daemon
allow zebra to accept static route types from upper level
protocols.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2696 from sworleys/Netlink-Fuzz
Russ White [Sun, 29 Jul 2018 12:33:43 +0000 (08:33 -0400)]
Merge pull request #2696 from sworleys/Netlink-Fuzz

zebra: Add code for fuzzing netlink

5 years agoMerge pull request #2700 from sworleys/Netlink-Prefix-Len-Check
Russ White [Sun, 29 Jul 2018 12:32:14 +0000 (08:32 -0400)]
Merge pull request #2700 from sworleys/Netlink-Prefix-Len-Check

zebra: Add check for prefix length from kernel messages

5 years agoMerge pull request #2728 from donaldsharp/table_cleanup
Russ White [Sun, 29 Jul 2018 12:24:38 +0000 (08:24 -0400)]
Merge pull request #2728 from donaldsharp/table_cleanup

lib: Add parameter names as a hint of what is expected.

5 years agoMerge pull request #2735 from sworleys/Netlink-Next-Fault
Russ White [Sun, 29 Jul 2018 11:58:01 +0000 (07:58 -0400)]
Merge pull request #2735 from sworleys/Netlink-Next-Fault

zebra: Check for netlink message next fault

5 years agoMerge pull request #2748 from chiragshah6/evpn_dev
Russ White [Sun, 29 Jul 2018 11:53:31 +0000 (07:53 -0400)]
Merge pull request #2748 from chiragshah6/evpn_dev

zebra: display consistant mac count

5 years agozebra: display consistant mac count
Chirag Shah [Sat, 28 Jul 2018 18:23:10 +0000 (11:23 -0700)]
zebra: display consistant mac count

show evpn mac vni all
show evpn mac vni x
does not display local svi and anycast mac into count.

Ticket:CM-20456
Testing Done:

Before:

TOR1# show evpn mac vni 1008
Number of MACs (local and remote) known for this VNI: 4
MAC               Type   Intf/Remote VTEP      VLAN
44:38:39:00:6b:4c local  vlan1008              1008
00:02:00:00:00:04 local  hostbond5             1008
00:02:00:00:00:02 local  hostbond4             1008
00:00:5e:00:01:01 local  vlan1008-v0           1008
00:02:00:00:00:0c remote 27.0.0.15
00:02:00:00:00:0a remote 27.0.0.15
dell-s6000-07#

After:

TOR1# show evpn mac vni 1008
Number of MACs (local and remote) known for this VNI: 6
MAC               Type   Intf/Remote VTEP      VLAN
44:38:39:00:6b:4c local  vlan1008              1008
00:02:00:00:00:04 local  hostbond5             1008
00:02:00:00:00:02 local  hostbond4             1008
00:00:5e:00:01:01 local  vlan1008-v0           1008
00:02:00:00:00:0c remote 27.0.0.15
00:02:00:00:00:0a remote 27.0.0.15

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoMerge pull request #2719 from pguibert6WIND/fix_tableno_vrf
Lou Berger [Sat, 28 Jul 2018 14:42:07 +0000 (10:42 -0400)]
Merge pull request #2719 from pguibert6WIND/fix_tableno_vrf

zebra: fix missing table identifier passed for ip route vrf commands

5 years agoMerge pull request #2742 from vangheem/master
Lou Berger [Sat, 28 Jul 2018 14:29:10 +0000 (10:29 -0400)]
Merge pull request #2742 from vangheem/master

fix json output when vrf not active

5 years agoMerge pull request #2746 from chiragshah6/mdev1
Lou Berger [Sat, 28 Jul 2018 14:18:12 +0000 (10:18 -0400)]
Merge pull request #2746 from chiragshah6/mdev1

bgpd: add keepalive thread name

5 years agoMerge pull request #2745 from adharkar/frr-filtered_route
Lou Berger [Sat, 28 Jul 2018 14:16:20 +0000 (10:16 -0400)]
Merge pull request #2745 from adharkar/frr-filtered_route

bgpd: Show routes filtered by prefix-list in filter-routes command

5 years agobgpd: add keepalive thread name
Chirag Shah [Thu, 26 Jul 2018 21:20:54 +0000 (14:20 -0700)]
bgpd: add keepalive thread name

Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobgpd: Show routes filtered by prefix-list in filter-routes command
Ameya Dharkar [Fri, 27 Jul 2018 18:23:32 +0000 (11:23 -0700)]
bgpd: Show routes filtered by prefix-list in filter-routes command
Update:Addressed review comments

Changed "show bgp ipv4 neighbor filtered-routes"
to show routes filtered by prefx lists, distribute lists and filter lists

Closes: #2653
Signed-off-by: Ameya Dharkar adharkar@vmware.com
5 years agoMerge pull request #2743 from donaldsharp/bgp_null_stuff
Lou Berger [Fri, 27 Jul 2018 16:45:08 +0000 (12:45 -0400)]
Merge pull request #2743 from donaldsharp/bgp_null_stuff

Put back some removed Code

5 years agolib,zebra: fix json output when vrf1 when not active
Nathan Van Gheem [Fri, 27 Jul 2018 14:09:38 +0000 (10:09 -0400)]
lib,zebra: fix json output when vrf1 when not active

When I did a show ip route with `json` on a vrf when it didn't exist,
frr would output invalid json.

Signed-off-by: Nathan Van Gheem <nathan@cumulusnetworks.com>
5 years agobgpd: Notice when we unlock if we should NULL pointer
Donald Sharp [Fri, 27 Jul 2018 14:02:34 +0000 (10:02 -0400)]
bgpd: Notice when we unlock if we should NULL pointer

The bi->net pointer that is being unlocked had a commit
that removed the `bi->net = NULL;` recently.  This code
was preventing a use after free crash being experienced
in other code paths.  While commit 37e679629f9 was fixing
a different code path crash.

Make the parent->net pointer aware it may be locked/freed
from multiple places and to not NULL the pointer to it
unless we have actually freed the data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: Modify route unlock code to return appropriate pointer
Donald Sharp [Fri, 27 Jul 2018 13:54:39 +0000 (09:54 -0400)]
lib: Modify route unlock code to return appropriate pointer

Modify the unlock code for a route_node to return NULL on
pointer freed or to return the node itself again.

We'll need to go through the code and fix this pattern,
but this is a problem for another day.  Get this fix in
place and we can make it a low hanging problem to fix.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2708 from ton31337/feature/default-originate_apply_route-maps
Russ White [Fri, 27 Jul 2018 13:05:43 +0000 (09:05 -0400)]
Merge pull request #2708 from ton31337/feature/default-originate_apply_route-maps

bgpd: Set attributes according route-maps if applied for default-originate

5 years agoMerge pull request #2737 from vishaldhingra/master
Russ White [Fri, 27 Jul 2018 13:05:00 +0000 (09:05 -0400)]
Merge pull request #2737 from vishaldhingra/master

bgpd: changes for crash seen in BGP on "no rt vpn" bug Id 2667

5 years agozebra: fix missing table identifier passed for ip route vrf commands
Philippe Guibert [Wed, 25 Jul 2018 09:32:13 +0000 (11:32 +0200)]
zebra: fix missing table identifier passed for ip route vrf commands

The parameter was missing in that vty command. Then it is being added.
Also some documentation is refreshed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #1 from vishaldhingra/bug_fix
vishaldhingra [Fri, 27 Jul 2018 04:37:33 +0000 (10:07 +0530)]
Merge pull request #1 from vishaldhingra/bug_fix

bgpd: changes for crash seen in BGP on "no rt vpn" bug Id 2667

5 years agobgpd: Set attributes according route-maps if applied for default-originate
Donatas Abraitis [Tue, 24 Jul 2018 13:42:53 +0000 (16:42 +0300)]
bgpd: Set attributes according route-maps if applied for default-originate

5 years agoMerge pull request #2729 from qlyoung/doc-misc-bgp-fixes
Russ White [Fri, 27 Jul 2018 02:32:40 +0000 (22:32 -0400)]
Merge pull request #2729 from qlyoung/doc-misc-bgp-fixes

doc: misc bgp.rst fixes

5 years agobgpd: Show routes filtered by prefix-list in filter-routes command
Ameya Dharkar [Thu, 26 Jul 2018 21:48:05 +0000 (14:48 -0700)]
bgpd: Show routes filtered by prefix-list in filter-routes command

Changed "show bgp ipv4 neighbor <peer> filtered-routes"
to show routes filtered by prefx lists, distribute lists and filter lists

Closes: #2653
Signed-off-by: Ameya Dharkar adharkar@vmware.com
5 years agozebra: Check for netlink message next fault
Stephen Worley [Thu, 26 Jul 2018 20:12:05 +0000 (16:12 -0400)]
zebra: Check for netlink message next fault

NLMSG_NEXT decrements the buffer length (status) by
the header msg length (nlmsg_len) everytime its called.
If nlmsg_len isn't accurate and set to be larger than
what it should represent, it will cause status to
decrement passed 0. This makes NLMSG_NEXT return a
pointer that references an inaccessible address.
When that is passed to NLMSG_OK, it segfaults.

Add a check to verify that there is still something to read
before we try to.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge branch 'master' into Netlink-Prefix-Len-Check
Stephen Worley [Thu, 26 Jul 2018 19:34:56 +0000 (15:34 -0400)]
Merge branch 'master' into Netlink-Prefix-Len-Check

5 years agozebra: Make prefix length check return error
Stephen Worley [Thu, 26 Jul 2018 19:10:53 +0000 (15:10 -0400)]
zebra: Make prefix length check return error

Prefix length validation checks should be returning an error
rather than 0. Switch to that and make them error messages.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoStyle, don't initialize netlink_read flag
Stephen Worley [Thu, 26 Jul 2018 18:34:28 +0000 (14:34 -0400)]
Style, don't initialize netlink_read flag

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agozebra: Make fuzzer code use default netlink socket
Stephen Worley [Thu, 26 Jul 2018 18:30:04 +0000 (14:30 -0400)]
zebra: Make fuzzer code use default netlink socket

Change the fuzzing code so that it fakes data from
the listening socket rather than using its own pseudo one.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #2727 from donaldsharp/pim_jp_lollipops
Jafar Al-Gharaibeh [Thu, 26 Jul 2018 15:18:39 +0000 (10:18 -0500)]
Merge pull request #2727 from donaldsharp/pim_jp_lollipops

pimd: RPT Prunes do not need to be figured for a *,G Prune

5 years agoMerge pull request #2607 from pguibert6WIND/complement_fs_patch3
Donald Sharp [Thu, 26 Jul 2018 13:25:35 +0000 (09:25 -0400)]
Merge pull request #2607 from pguibert6WIND/complement_fs_patch3

Complement fs patch3

5 years agoMerge pull request #2681 from qlyoung/doc-cleanup-rpki
Jafar Al-Gharaibeh [Wed, 25 Jul 2018 22:04:02 +0000 (17:04 -0500)]
Merge pull request #2681 from qlyoung/doc-cleanup-rpki

doc: cleanup rpki.rst

5 years agoMerge pull request #2662 from donaldsharp/tests
Lou Berger [Wed, 25 Jul 2018 21:53:05 +0000 (17:53 -0400)]
Merge pull request #2662 from donaldsharp/tests

Tests

5 years agodoc: misc bgp.rst fixes
Quentin Young [Tue, 24 Jul 2018 17:21:19 +0000 (17:21 +0000)]
doc: misc bgp.rst fixes

* Clean up command stubs
* Document `disable-connected-check`
* Add markup
* Clarify section on autonomous systems
* Rewrap line to 80 characters
* Fix typos
* Fix grammar

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: Add parameter names as a hint of what is expected.
Donald Sharp [Wed, 25 Jul 2018 19:16:02 +0000 (15:16 -0400)]
lib: Add parameter names as a hint of what is expected.

Add some parameter names to functions in table.h to give a
clue as to what we expect people to pass in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotests: Let compiler know this was an intentionall fallthrough
Donald Sharp [Wed, 25 Jul 2018 19:00:52 +0000 (15:00 -0400)]
tests: Let compiler know this was an intentionall fallthrough

Let the compiler know that this code intentionally fell
through to the next case statement in a switch.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotests: Prevent weird type promotion objection in bgp tests
Donald Sharp [Fri, 13 Jul 2018 11:26:32 +0000 (07:26 -0400)]
tests: Prevent weird type promotion objection in bgp tests

The va_start function cannot take a object that can be type promoted
Looks like a new warning coming in from a new compiler.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotests: Fix const change
Donald Sharp [Fri, 13 Jul 2018 10:14:53 +0000 (06:14 -0400)]
tests: Fix const change

Some of the parameters for lib/srcdest.. have changed to
consts, make the test cases respect that.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: RPT Prunes do not need to be figured for a *,G Prune
Donald Sharp [Wed, 25 Jul 2018 18:37:30 +0000 (14:37 -0400)]
pimd: RPT Prunes do not need to be figured for a *,G Prune

Packet sending in PIM is a two step process.
1) Gather data size of next G to be packed into a packet.
2) Write data

After 1 we need to ensure that the next G to pack will actually
fit in a packet.  If it does not send what we've currently written
and start a new packet to send.

Because this was a 2 step process it is important to be consistent
in what you think you have packed -vs- what you think you should.

PIM has a bug where we were considering S,G RPT Prunes for a *,G
even when the *,G was being pruned.  This lead to a situation where
we were figuring a write size of more data then what we actually wrote
into a packet.  This would leave a 8 byte whole of 0's in the packet
due to the way we moved pointers around.

Fix the code so that we do not attempt to consider S,G rpt prunes
for a *,G prune when figuring out how much we should write in step 1.

Ticket: CM-21644
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #2711 from pacovn/isis_test_fixes
Quentin Young [Wed, 25 Jul 2018 18:01:06 +0000 (11:01 -0700)]
Merge pull request #2711 from pacovn/isis_test_fixes

tests/isisd: fix warnings

5 years agoMerge pull request #2712 from pacovn/Security_Uninitialized_memory_access
Renato Westphal [Wed, 25 Jul 2018 14:07:57 +0000 (11:07 -0300)]
Merge pull request #2712 from pacovn/Security_Uninitialized_memory_access

pimd: uninitialized memory access fix

5 years agobgpd: changes for crash seen in BGP on "no rt vpn" bug Id 2667
root [Wed, 25 Jul 2018 12:27:05 +0000 (05:27 -0700)]
bgpd: changes for crash seen in BGP on "no rt vpn" bug Id 2667

There is a default BGP VPN and BGP VRF instance in L3VPN configuration.
The routes are imported and exported between BGP VPN and BGP VRF.
Suppose there is one route in BGP VRF and exported to BGP VPN.
In BGP VPN there is bgp_info struct with bgp_info_extra struct has parent pointer pointing to the bgp_info of BGP VRF.
We take the lock for bgp_node and bgp_info of BGP VRF in the context of BGP VPN.
bgp_info has a back pointer to bgp_node via net.

Now when we have done "no rd vpn" in BGP VRF then in bgp_info_extra_free we have to free the parent resources.
In this context only unlocking is required. It should not set the BGP VRF (bgp_info->net) to NULL.

Signed-off-by: vishaldhingra vdhingra@vmware.com
5 years agoMerge pull request #2704 from sworleys/Netlink-Nexthop-Hang
Russ White [Tue, 24 Jul 2018 23:42:11 +0000 (19:42 -0400)]
Merge pull request #2704 from sworleys/Netlink-Nexthop-Hang

zebra: Add check for nexthop loop to prevent hanging

5 years agoMerge pull request #2706 from chiragshah6/mdev
Russ White [Tue, 24 Jul 2018 23:29:05 +0000 (19:29 -0400)]
Merge pull request #2706 from chiragshah6/mdev

bgpd: Add evpn prefix to debug bgp updates prefix

5 years agoMerge pull request #2714 from qlyoung/fix-unused-variable-zserv
Russ White [Tue, 24 Jul 2018 23:26:13 +0000 (19:26 -0400)]
Merge pull request #2714 from qlyoung/fix-unused-variable-zserv

zebra: remove unused var in zserv.c

5 years agopimd: uninitialized memory access fix
F. Aragon [Tue, 24 Jul 2018 16:46:38 +0000 (18:46 +0200)]
pimd: uninitialized memory access fix

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agodoc: move rpki reference to correct spot
Quentin Young [Tue, 24 Jul 2018 21:13:28 +0000 (21:13 +0000)]
doc: move rpki reference to correct spot

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agozebra: remove unused var in zserv.c
Quentin Young [Tue, 24 Jul 2018 21:01:29 +0000 (21:01 +0000)]
zebra: remove unused var in zserv.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #2699 from sworleys/Netlink-MTU-Check
Renato Westphal [Tue, 24 Jul 2018 20:04:47 +0000 (17:04 -0300)]
Merge pull request #2699 from sworleys/Netlink-MTU-Check

zebra: Add check for mtu on netlink RTM_NEWLINK

5 years agoRefactor code for new fuzzing netlink flag
Stephen Worley [Tue, 24 Jul 2018 17:39:25 +0000 (13:39 -0400)]
Refactor code for new fuzzing netlink flag

Changed the configure flag used by netlink fuzzing
and refactored code accordingly.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agotests/isisd: fix warnings
F. Aragon [Tue, 24 Jul 2018 16:21:57 +0000 (18:21 +0200)]
tests/isisd: fix warnings

Commit ae9c9aba changed isis_vertex_id_init() and isis_find_vertex()
parameters, so compiler reported warnings in the test (the actual data
passing through is the same because of the union used in the latest changes).
This commit fixes the warnings in the test.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #2665 from chiragshah6/evpn_dev
Russ White [Tue, 24 Jul 2018 15:55:08 +0000 (11:55 -0400)]
Merge pull request #2665 from chiragshah6/evpn_dev

bgpd: support evpn nd ext community

5 years agoMerge pull request #2707 from opensourcerouting/fix-srcdest-netlink-read
Donald Sharp [Tue, 24 Jul 2018 15:49:49 +0000 (11:49 -0400)]
Merge pull request #2707 from opensourcerouting/fix-srcdest-netlink-read

zebra: do not ignore ipv6 srcdest routes

5 years agoMerge pull request #2640 from pguibert6WIND/doc_ldp
Quentin Young [Tue, 24 Jul 2018 15:34:22 +0000 (11:34 -0400)]
Merge pull request #2640 from pguibert6WIND/doc_ldp

doc: add Ldp user documentation

5 years agoRemove whitespace change in netlink fuzz code
Stephen Worley [Tue, 24 Jul 2018 15:24:42 +0000 (11:24 -0400)]
Remove whitespace change in netlink fuzz code

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoChange log statements to use unsigned format
Stephen Worley [Tue, 24 Jul 2018 15:14:07 +0000 (11:14 -0400)]
Change log statements to use unsigned format

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agobgpd: Add evpn prefix to debug bgp updates prefix
Chirag Shah [Sat, 21 Jul 2018 18:08:51 +0000 (11:08 -0700)]
bgpd: Add evpn prefix to debug bgp updates prefix

Adding EVPN prefix of Type 2, 3 and 5 routes to bgp updates
prefix filters.

Ticket:CM-14476
Testing Done:

Configure multiple evpn options under 'debug bgp updates prefix'.
Below is the running-config output.

MAC-IP route with just MAC:
debug bgp updates prefix l2vpn evpn type macip mac
00:02:00:0a:0a:0a
MAC-IP route with MAC and IP:
debug bgp updates prefix l2vpn evpn type macip mac
00:02:00:00:00:0c ip 45.0.1.9
MAC-IP route with just MAC and IPv6:
debug bgp updates prefix l2vpn evpn type
macip mac 00:02:00:00:00:0a ip 2001:fee1:0:1::8
Type-3:
debug bgp updates prefix l2vpn evpn type multicast ip 27.0.1.19
Type-5:
debug bgp updates prefix l2vpn evpn type prefix
ip 2060:1:1:1::/64

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoMerge pull request #2703 from opensourcerouting/ldpd-missing-command
Donald Sharp [Tue, 24 Jul 2018 12:37:52 +0000 (08:37 -0400)]
Merge pull request #2703 from opensourcerouting/ldpd-missing-command

ldpd: add missing command under the ipv6 address-family node

5 years agozebra: do not ignore ipv6 srcdest routes
Christian Franke [Mon, 23 Jul 2018 01:40:42 +0000 (03:40 +0200)]
zebra: do not ignore ipv6 srcdest routes

Commit a2ca67d1d2 consolidated IPv4 and IPv6 handling. It also applied
our ignorance for IPv4 srcdest routes onto IPv6.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agozebra: add information about which port is monitored
Philippe Guibert [Fri, 6 Jul 2018 11:09:13 +0000 (13:09 +0200)]
zebra: add information about which port is monitored

Each ipset with port value monitors either src port or dst port.
The information is added to show pbr iptable commmand.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: flowspec 'no local-install any' wrong order in show runni
Philippe Guibert [Fri, 20 Jul 2018 15:24:43 +0000 (17:24 +0200)]
bgpd: flowspec 'no local-install any' wrong order in show runni

When configuring an interface, the no local-install any command appears,
and leads to confusions. because the effect of that command differs if
it is executed after local-install <interfaces> or before executing
local-install <interfaces>, the proposal fix here is to suppress that
command from the vty available commands.

PR=59595
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Acked-by: Alain Ritoux <alain.ritoux@6wind.com>
5 years agobgpd: display more than one FS entre per IP
Philippe Guibert [Mon, 2 Jul 2018 15:25:32 +0000 (17:25 +0200)]
bgpd: display more than one FS entre per IP

because the IP destination criterium may match several entries, the show
command may return more than one entry.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: add the pbr identifier in the log messages
Philippe Guibert [Mon, 2 Jul 2018 14:53:19 +0000 (16:53 +0200)]
bgpd: add the pbr identifier in the log messages

for clarity sake, the identifier is inserted in the debug line.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: flush remaining entry if bgp_pbr_match is equal
Philippe Guibert [Mon, 2 Jul 2018 14:50:36 +0000 (16:50 +0200)]
bgpd: flush remaining entry if bgp_pbr_match is equal

When adding an entry, a check is done in order to flush previously
configured entries. The whole parameters are checked so as to not remove
some entries that have ipset entries equal, but not iptable settings.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: rework jhash algorithm for bgp_pbr_match entries
Philippe Guibert [Mon, 2 Jul 2018 14:48:48 +0000 (16:48 +0200)]
bgpd: rework jhash algorithm for bgp_pbr_match entries

Instead of relying on jhash_1word for some parameters that are not 32
bit size, the jash(pointer, len) function is used.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: add debug trace when bgp fs pbr remove too
Philippe Guibert [Mon, 2 Jul 2018 12:59:19 +0000 (14:59 +0200)]
bgpd: add debug trace when bgp fs pbr remove too

Removal action from flowspec to policy-routing is also traced back.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: show pbr iptable per iptable
Philippe Guibert [Fri, 29 Jun 2018 11:45:01 +0000 (13:45 +0200)]
zebra: show pbr iptable per iptable

Add ability to pass a ip table parameter.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: flowspec pbr entries listed on the bgp information entry
Philippe Guibert [Thu, 28 Jun 2018 15:26:22 +0000 (17:26 +0200)]
bgpd: flowspec pbr entries listed on the bgp information entry

Because one flowspec entry can create 1-N bgp pbr entries, the list is
now updated and visible. Also, because the bgp_extra structure is used,
this list is flushed when the bgp_extra structure is deleted.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: Add check for nexthop loop to prevent hanging
Stephen Worley [Mon, 23 Jul 2018 22:33:53 +0000 (18:33 -0400)]
zebra: Add check for nexthop loop to prevent hanging

Bad nexthop messages from netlink were causing zebra
to hang here. Added a check to verify the length
of the nexthop so it doesn't keep trying to read.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoldpd: add missing command under the ipv6 address-family node
Renato Westphal [Mon, 23 Jul 2018 22:10:57 +0000 (19:10 -0300)]
ldpd: add missing command under the ipv6 address-family node

Bug found by Patrick Velder.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #2698 from sworleys/Netlink-Filter-AFI
Russ White [Mon, 23 Jul 2018 21:45:44 +0000 (17:45 -0400)]
Merge pull request #2698 from sworleys/Netlink-Filter-AFI

zebra: Add address family filters

5 years agoMerge pull request #2697 from mjstapp/routemap_const
Russ White [Mon, 23 Jul 2018 21:42:04 +0000 (17:42 -0400)]
Merge pull request #2697 from mjstapp/routemap_const

libs, daemons: use const in route-map apply

5 years agoMerge pull request #2701 from FRRouting/revert-2670-feature/use_med_if_applied_for_de...
Russ White [Mon, 23 Jul 2018 21:08:43 +0000 (17:08 -0400)]
Merge pull request #2701 from FRRouting/revert-2670-feature/use_med_if_applied_for_default_route

Revert "Use metric for default-originate with route-map if applied"

5 years agoRevert "Use metric for default-originate with route-map if applied"
Russ White [Mon, 23 Jul 2018 21:08:24 +0000 (17:08 -0400)]
Revert "Use metric for default-originate with route-map if applied"

5 years agoMerge pull request #2670 from ton31337/feature/use_med_if_applied_for_default_route
Russ White [Mon, 23 Jul 2018 21:04:48 +0000 (17:04 -0400)]
Merge pull request #2670 from ton31337/feature/use_med_if_applied_for_default_route

Use metric for default-originate with route-map if applied

5 years agoMerge pull request #2646 from AnuradhaKaruppiah/evpn-fixes
Russ White [Mon, 23 Jul 2018 20:53:34 +0000 (16:53 -0400)]
Merge pull request #2646 from AnuradhaKaruppiah/evpn-fixes

zebra: install EVPN gateway MAC as static/sticky

5 years agoMerge pull request #2641 from donaldsharp/pim_igmp_dr
Russ White [Mon, 23 Jul 2018 20:50:59 +0000 (16:50 -0400)]
Merge pull request #2641 from donaldsharp/pim_igmp_dr

pimd: Do not create upstream state when not DR for igmp request

5 years agoRemove not needed filters and fix typos
Stephen Worley [Mon, 23 Jul 2018 18:34:43 +0000 (14:34 -0400)]
Remove not needed filters and fix typos

Some more address family filters we can safely ignore
as well as typos in logger. Added AF_MPLS as filterable.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agozebra: Add check for prefix length from kernel messages
Stephen Worley [Sat, 21 Jul 2018 03:20:28 +0000 (23:20 -0400)]
zebra: Add check for prefix length from kernel messages

Zebra needed a check that varifies the prefix length
of an address is a valid length when receiving route
changes and interface address changes.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #2668 from dslicenc/cm21722-v6-vrf-display
Renato Westphal [Mon, 23 Jul 2018 17:56:29 +0000 (14:56 -0300)]
Merge pull request #2668 from dslicenc/cm21722-v6-vrf-display

zebra: remove default vrf output for kernel vrf ipv6 blackhole default

5 years agoMerge pull request #2689 from dslicenc/vrf-exit-reload
Renato Westphal [Mon, 23 Jul 2018 17:46:10 +0000 (14:46 -0300)]
Merge pull request #2689 from dslicenc/vrf-exit-reload

tools: handle exit-vrf as end of context block

5 years agozebra: Add check for mtu on netlink RTM_NEWLINK
Stephen Worley [Fri, 20 Jul 2018 20:10:43 +0000 (16:10 -0400)]
zebra: Add check for mtu on netlink RTM_NEWLINK

Zebra needed a check for mtu from the message it
received from the kernel before adding the new link.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agozebra: Add address family filters
Stephen Worley [Thu, 19 Jul 2018 21:29:16 +0000 (17:29 -0400)]
zebra: Add address family filters

The zebra netlink socket was attempting to read netlink
messages with invalid address families in a couple areas.
Added filters and warn messages.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoStyle for Add code for fuzzing netlink
Stephen Worley [Mon, 23 Jul 2018 15:25:31 +0000 (11:25 -0400)]
Style for Add code for fuzzing netlink

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agozebra: clean up const use in bsd build
Mark Stapp [Mon, 23 Jul 2018 15:22:14 +0000 (11:22 -0400)]
zebra: clean up const use in bsd build

Missed a bsd/routing socket change when enforcing use of const
in some kernel-facing api calls.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agolibs, daemons: use const in route-map apply
Mark Stapp [Thu, 12 Jul 2018 20:05:19 +0000 (16:05 -0400)]
libs, daemons: use const in route-map apply

Use 'const prefix *' in route-map apply apis; led to some
corresponding changes in several daemons.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #2652 from LabNConsulting/working/master/confdate_cleanup
Donald Sharp [Mon, 23 Jul 2018 12:46:26 +0000 (08:46 -0400)]
Merge pull request #2652 from LabNConsulting/working/master/confdate_cleanup

Simplify deprecation check

5 years agozebra: Add code for fuzzing netlink
Stephen Worley [Thu, 19 Jul 2018 19:21:29 +0000 (15:21 -0400)]
zebra: Add code for fuzzing netlink

This code allows you to fuzz the netlink listening socket
in zebra by --enable-fuzzing and passing the -w [FILE]
option when running zebra.

File collection is stored in /var/run/frr/netlink_*
where each number is just a counter to keep the
files distinct.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #2672 from pcarana/pcarana-add-rpki-rh
Martin Winter [Fri, 20 Jul 2018 20:29:56 +0000 (22:29 +0200)]
Merge pull request #2672 from pcarana/pcarana-add-rpki-rh

RedHat spec: Add the rpki module when needed

5 years agoMerge pull request #2692 from manuhalo/module_param_docs
Quentin Young [Fri, 20 Jul 2018 16:09:57 +0000 (12:09 -0400)]
Merge pull request #2692 from manuhalo/module_param_docs

doc: add cmd line param section to modules.rst

5 years agoMerge pull request #2690 from opensourcerouting/fix-srcdest-route-display
Donald Sharp [Fri, 20 Jul 2018 05:55:53 +0000 (01:55 -0400)]
Merge pull request #2690 from opensourcerouting/fix-srcdest-route-display

zebra: fix do_show_route_helper to include srcdest routes

5 years agoMerge pull request #2688 from pguibert6WIND/vrf_delete_on_netns_fail
Donald Sharp [Fri, 20 Jul 2018 05:54:10 +0000 (01:54 -0400)]
Merge pull request #2688 from pguibert6WIND/vrf_delete_on_netns_fail

zebra: cancel vrf creation if netns activation failed

5 years agoMerge pull request #2691 from adharkar/frr-bgp_cli
Donald Sharp [Fri, 20 Jul 2018 00:05:19 +0000 (20:05 -0400)]
Merge pull request #2691 from adharkar/frr-bgp_cli

bgpd: Changes to BGP show json commands

5 years agoMerge pull request #2687 from opensourcerouting/fix-cpp-notice-on-old-compilers
Quentin Young [Thu, 19 Jul 2018 21:10:45 +0000 (17:10 -0400)]
Merge pull request #2687 from opensourcerouting/fix-cpp-notice-on-old-compilers

lib/compiler.h: Always define CPP_NOTICE

5 years agobgpd: Changes to BGP show json commands
Ameya Dharkar [Thu, 19 Jul 2018 20:46:46 +0000 (13:46 -0700)]
bgpd: Changes to BGP show json commands
Added localRouterID to "show bgp neighbor json"
Added json O/P to "show bgp [AFI] community <community>"

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
5 years agozebra: fix do_show_route_helper to include srcdest routes
Christian Franke [Thu, 19 Jul 2018 19:16:06 +0000 (15:16 -0400)]
zebra: fix do_show_route_helper to include srcdest routes

5 years agotools: handle exit-vrf as end of context block
Don Slice [Thu, 19 Jul 2018 18:26:38 +0000 (18:26 +0000)]
tools: handle exit-vrf as end of context block

Ticket: CM-21048
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agodoc: add cmd line param section to modules.rst
Emanuele Di Pascale [Thu, 19 Jul 2018 16:28:25 +0000 (18:28 +0200)]
doc: add cmd line param section to modules.rst

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>