]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
6 years agobgpd: Do not send UPDATE message with maximum-prefix 4225/head
Donatas Abraitis [Mon, 15 Apr 2019 20:53:20 +0000 (23:53 +0300)]
bgpd: Do not send UPDATE message with maximum-prefix

When using maximum-prefix and count is overflow BGP
sends UPDATE message:

Apr 15 20:45:06 exit1-debian-9 bgpd[9818]: 192.168.0.2 [Error] Error parsing NLRI
Apr 15 20:45:06 exit1-debian-9 bgpd[9818]: %NOTIFICATION: sent to neighbor 192.168.0.2 3/10 (UPDATE Message Error/Invalid Network Field) 0 bytes

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
6 years agoMerge pull request #4213 from ton31337/feature/all_alias_for_force_next_self_host_5.0
Quentin Young [Mon, 29 Apr 2019 16:56:36 +0000 (12:56 -0400)]
Merge pull request #4213 from ton31337/feature/all_alias_for_force_next_self_host_5.0

bgpd: [5.0] Make sure `next-hop-self all` backward compatible with force

6 years agoMerge pull request #4217 from ton31337/fix/show_ipv6_bgp_summary_incorrect_peers
Quentin Young [Mon, 29 Apr 2019 16:41:44 +0000 (12:41 -0400)]
Merge pull request #4217 from ton31337/fix/show_ipv6_bgp_summary_incorrect_peers

bgpd: [5.0] Incorrect number of peers count in "show bgp ipv6 summary" output

6 years agobgpd: Incorrect number of peers count in "show bgp ipv6 summary" output 4217/head
Akhilesh Samineni [Fri, 15 Feb 2019 16:50:51 +0000 (22:20 +0530)]
bgpd: Incorrect number of peers count in "show bgp ipv6 summary" output

Fix : Now the peers count displays the number of neighbors activated per afi/safi.

Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
6 years agobgpd: Make sure `next-hop-self all` backward compatible with force 4213/head
Donatas Abraitis [Thu, 25 Apr 2019 13:39:49 +0000 (16:39 +0300)]
bgpd: Make sure `next-hop-self all` backward compatible with force

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
6 years agoMerge pull request #4146 from ton31337/fix/add_missing_peer_flag_for_ipv6_only
Quentin Young [Wed, 17 Apr 2019 15:24:13 +0000 (11:24 -0400)]
Merge pull request #4146 from ton31337/fix/add_missing_peer_flag_for_ipv6_only

bgpd: [5.0] Add peer action for PEER_FLAG_IFPEER_V6ONLY flag

6 years agobgpd: Add peer action for PEER_FLAG_IFPEER_V6ONLY flag 4146/head
Donatas Abraitis [Mon, 25 Feb 2019 19:16:02 +0000 (21:16 +0200)]
bgpd: Add peer action for PEER_FLAG_IFPEER_V6ONLY flag

peer_flag_modify() will always return BGP_ERR_INVALID_FLAG because
the action was not defined for PEER_FLAG_IFPEER_V6ONLY flag.

```
global PEER_FLAG_IFPEER_V6ONLY = 16384;
global BGP_ERR_INVALID_FLAG = -2;

probe process("/usr/lib/frr/bgpd").statement("peer_flag_modify@/root/frr/bgpd/bgpd.c:3975")
{
if ($flag == PEER_FLAG_IFPEER_V6ONLY && $action->type == 0)
printf("action not found for the flag PEER_FLAG_IFPEER_V6ONLY\n");
}

probe process("/usr/lib/frr/bgpd").function("peer_flag_modify").return
{
if ($return == BGP_ERR_INVALID_FLAG)
printf("return BGP_ERR_INVALID_FLAG\n");
}
```
produces:
action not found for the flag PEER_FLAG_IFPEER_V6ONLY
return BGP_ERR_INVALID_FLAG

$ vtysh -c 'conf t' -c 'router bgp 20' -c 'neighbor eth1 interface v6only remote-as external'

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
6 years agoMerge pull request #4091 from ton31337/stable/5.0
Donald Sharp [Tue, 16 Apr 2019 15:50:04 +0000 (11:50 -0400)]
Merge pull request #4091 from ton31337/stable/5.0

bgpd: [5.0] Remove private AS numbers if local-as is defined

6 years agoMerge pull request #4110 from pacovn/201904_5.0__lm_aliasing_fixes
Renato Westphal [Tue, 16 Apr 2019 12:51:17 +0000 (09:51 -0300)]
Merge pull request #4110 from pacovn/201904_5.0__lm_aliasing_fixes

zebra: label manager race condition fix (5.0 branch)

6 years agozebra: label manager race condition fix 4110/head
F. Aragon [Fri, 5 Apr 2019 13:26:14 +0000 (15:26 +0200)]
zebra: label manager race condition fix

This fix covers the case where two or more events are processed but only one
becoming effective. E.g. when mixing a synchronous label request from a LDP
deamon and an asynchronous request from a BGP daemon it could happen to the
BGP having the label chunk, but the LDP stuck waiting for the response.

Given e.g.

  ldpd     <-------->
  (sync label request)
                       Zebra (label proxy)  <-->  Zebra (shared label manager)
  bgpd     <-------->
  (async label request)

Sequence:

   LDP label request ----->
                               Zebra (label proxy FW) ----> Zebra (LM)
   BGP label request ----->
                               Zebra (label proxy FW) ----> Zebra (LM)
                                                      <---- Zebra (LM) RP LDP
                                                      <---- Zebra (LM) RP BGP

Signed-off-by: F. Aragon <paco@voltanet.io>
6 years agobgpd: Remove private AS numbers if local-as is defined 4091/head
Donatas Abraitis [Sat, 2 Mar 2019 20:36:31 +0000 (22:36 +0200)]
bgpd: Remove private AS numbers if local-as is defined

When using remove-private-AS together with local-as
aspath_remove_private_asns() is called before bgp_packet_attribute().

In this case, private AS will always appear in front of change_local_as.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
6 years agoFRRouting Release 5.0.2 frr-5.0.2
Martin Winter [Tue, 8 Jan 2019 08:53:23 +0000 (00:53 -0800)]
FRRouting Release 5.0.2

Changes since 5.0.1:
 - Security Issue (Denial of Service): Fix BGP Attribute 255 (experimental VNC)
   handling
 - Fix for large AS paths
 - PIM fixes
 - BGP flowspec fixes
 - PBR fixes
 - Fix for ISIS crash
 - Add backport to build FRR on Sonic Debian

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoMerge pull request #3578 from LabNConsulting/working/5.0/no-bgp-attr-255
Donald Sharp [Mon, 7 Jan 2019 22:33:21 +0000 (17:33 -0500)]
Merge pull request #3578 from LabNConsulting/working/5.0/no-bgp-attr-255

5.0: bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined

6 years agobgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined 3578/head
Lou Berger [Mon, 7 Jan 2019 16:32:54 +0000 (11:32 -0500)]
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoMerge pull request #3226 from zhenggen-xu/5.0-sonic
Martin Winter [Sat, 17 Nov 2018 13:29:03 +0000 (14:29 +0100)]
Merge pull request #3226 from zhenggen-xu/5.0-sonic

debianpkg: support SONiC debian8 on FRR 5.0.x

6 years agodebianpkg: Change the target name to sonic8 3226/head
Zhenggen Xu [Fri, 26 Oct 2018 17:12:30 +0000 (10:12 -0700)]
debianpkg: Change the target name to sonic8

Previous sonic.debian8 could cause conflicts with debian8

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
6 years agodebianpkg: support SONiC debian8 on FRR 5.0.x
Zhenggen Xu [Wed, 26 Sep 2018 07:03:51 +0000 (00:03 -0700)]
debianpkg: support SONiC debian8 on FRR 5.0.x

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
6 years agoMerge pull request #3171 from opensourcerouting/50-memleak-fix
Donald Sharp [Mon, 15 Oct 2018 11:42:57 +0000 (07:42 -0400)]
Merge pull request #3171 from opensourcerouting/50-memleak-fix

5.0: backport memory leak fix

6 years agolib: refactor thread_execute 3171/head
Rafael Zalamena [Mon, 1 Oct 2018 16:38:34 +0000 (13:38 -0300)]
lib: refactor thread_execute

Don't allocate threads in the stack, but use the standardized
`thread_get` and `thread_add_unused` to avoid creating corner cases in
the thread API.

This fixes a thread mutex memory leak in FreeBSD.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
(cherry picked from commit c4345fbf71fcc7ef4b64d95979f252c613dd3ebf)

6 years agoMerge pull request #3130 from donaldsharp/early_5.0
David Lamparter [Thu, 4 Oct 2018 13:08:33 +0000 (15:08 +0200)]
Merge pull request #3130 from donaldsharp/early_5.0

lib: Include compiler.h as early as is possible in the build

6 years agolib: Include compiler.h as early as is possible in the build 3130/head
Donald Sharp [Wed, 3 Oct 2018 16:27:57 +0000 (12:27 -0400)]
lib: Include compiler.h as early as is possible in the build

The compiler.h header provides us with some useful macro's
that we are using in the system.  We do not know exactly
where the CPP_NOTICE and CPP_WARN macros are used but
they can move around.  Place this header early in the
build then.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3079 from opensourcerouting/large_as_path_5
Donald Sharp [Mon, 24 Sep 2018 16:02:12 +0000 (12:02 -0400)]
Merge pull request #3079 from opensourcerouting/large_as_path_5

bgpd: Fix for large AS paths which are split into segments (5.0 branch)

6 years agobgpd: Fix for large AS paths which are split into segments 3079/head
Martin Winter [Fri, 7 Sep 2018 21:43:11 +0000 (14:43 -0700)]
bgpd: Fix for large AS paths which are split into segments

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoMerge pull request #3055 from donaldsharp/zebra_5.0
Martin Winter [Thu, 20 Sep 2018 16:26:03 +0000 (03:26 +1100)]
Merge pull request #3055 from donaldsharp/zebra_5.0

zebra: Send correct default vrf tableid for MROUTE stats

6 years agoMerge pull request #3047 from donaldsharp/pim_5.0
Martin Winter [Thu, 20 Sep 2018 12:38:52 +0000 (23:38 +1100)]
Merge pull request #3047 from donaldsharp/pim_5.0

pimd: Actually create vif's in non-integrated config

6 years agozebra: Send correct default vrf tableid for MROUTE stats 3055/head
Donald Sharp [Mon, 17 Sep 2018 13:18:40 +0000 (09:18 -0400)]
zebra: Send correct default vrf tableid for MROUTE stats

So the linux kernel uses the RT_TABLE_MAIN for the table
id used for ip routing.  The multicast routing tables use
RT_TABLE_DEFAULT.  We changed the internal code of zebra_vrf
a few months back to use RT_TABLE_MAIN as the tableid to
use.  This caused the pim sg stats to stop working because
of the kernel bug where it uses a different table
for ip routing and ip multicast.

Put a bit of a special case in to do the right thing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Actually create vif's in non-integrated config 3047/head
Donald Sharp [Mon, 17 Sep 2018 17:58:59 +0000 (13:58 -0400)]
pimd: Actually create vif's in non-integrated config

The startup of a non-integrated config was not properly
allowing for startup to create the vif when we have
not learned about the interface we are trying to configure
at this point in time.  Actually notice when we are
trying to create a pimreg device or not to properly
notice when to attempt to create the vif or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2967 from pacovn/stable/5.0
David Lamparter [Tue, 18 Sep 2018 15:30:30 +0000 (17:30 +0200)]
Merge pull request #2967 from pacovn/stable/5.0

zebra: filter zebra messages (label manager)

6 years agolib: build fix for older compilers (backport) 2967/head
F. Aragon [Wed, 5 Sep 2018 15:59:37 +0000 (17:59 +0200)]
lib: build fix for older compilers (backport)

Signed-off-by: F. Aragon <paco@voltanet.io>
6 years agozebra: filter zebra messages (label manager)
F. Aragon [Tue, 4 Sep 2018 12:37:00 +0000 (14:37 +0200)]
zebra: filter zebra messages (label manager)

This change makes the zebra acting as label manager proxy not to relay non-LM
messages to clients that a zebra acting in non-proxy mode may send to it. Also,
the existing code does not schedule a rcv in case of relay_response_back
returns -1. This patch re-schedules reads on the socket even in case such a
function returns -1 by calling thread_add_read().

Signed-off-by: F. Aragon <paco@voltanet.io>
6 years agoMerge pull request #2732 from pguibert6WIND/fs_complement_3_50
Donald Sharp [Thu, 23 Aug 2018 14:15:46 +0000 (10:15 -0400)]
Merge pull request #2732 from pguibert6WIND/fs_complement_3_50

Complement fs patch3

6 years agobgpd: pbr entry log message changed to zlog_debug 2732/head
Philippe Guibert [Tue, 21 Aug 2018 08:43:33 +0000 (10:43 +0200)]
bgpd: pbr entry log message changed to zlog_debug

pbr entry log message changed to zlog_debug.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: simplify fs add pbr entry
Philippe Guibert [Tue, 21 Aug 2018 08:38:27 +0000 (10:38 +0200)]
bgpd: simplify fs add pbr entry

Simplify the fs pbr entry creation.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: avoid memory leak in bgp flowspec list, plus usage of bool
Philippe Guibert [Mon, 20 Aug 2018 16:32:00 +0000 (18:32 +0200)]
bgpd: avoid memory leak in bgp flowspec list, plus usage of bool

Avoid memory leak in bgp flowspec list.
Usage of bool parameter instead of int, to handle the number of entries
PBR.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 years agoMerge pull request #2808 from adharkar/frr-zebra_cli-5.0
Donald Sharp [Tue, 14 Aug 2018 11:56:05 +0000 (07:56 -0400)]
Merge pull request #2808 from adharkar/frr-zebra_cli-5.0

Zebra: Changes to "show ip route" json commands backport to stable/5.0

6 years agoZebra: Changes to "show ip route" json commands backport to stable/5.0 2808/head
Ameya Dharkar [Wed, 8 Aug 2018 19:24:27 +0000 (12:24 -0700)]
Zebra: Changes to "show ip route" json commands backport to stable/5.0

1. Added json output to "show ip route " command
2. Added tag O/P to "show ip route json" command

Signed-off-by: Ameya Dharkar adharkar@vmware.com
6 years agoMerge pull request #2721 from pguibert6WIND/doc_compile_issue
Quentin Young [Mon, 30 Jul 2018 20:21:22 +0000 (13:21 -0700)]
Merge pull request #2721 from pguibert6WIND/doc_compile_issue

doc: fix misc documentation compilation error

6 years agoMerge pull request #2734 from pguibert6WIND/missing_void
Russ White [Sun, 29 Jul 2018 12:07:15 +0000 (08:07 -0400)]
Merge pull request #2734 from pguibert6WIND/missing_void

zebra: align zebra pbr code to master code.

6 years agozebra: align zebra pbr code to master code. 2733/head 2734/head
Philippe Guibert [Thu, 26 Jul 2018 15:56:56 +0000 (17:56 +0200)]
zebra: align zebra pbr code to master code.

Align zebra pbr code to master code.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoMerge pull request #2720 from pguibert6WIND/misc_vrf_fix
Renato Westphal [Thu, 26 Jul 2018 14:50:44 +0000 (11:50 -0300)]
Merge pull request #2720 from pguibert6WIND/misc_vrf_fix

Misc vrf fix

6 years agodoc: fix misc documentation compilation error 2721/head
Philippe Guibert [Wed, 25 Jul 2018 09:47:27 +0000 (11:47 +0200)]
doc: fix misc documentation compilation error

The cherry-picking of documentation from master went wrong. This commit
is here to fix the compilation errors.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: cancel vrf creation if netns activation failed 2720/head
Philippe Guibert [Thu, 19 Jul 2018 15:51:41 +0000 (17:51 +0200)]
zebra: cancel vrf creation if netns activation failed

To keep configuration consistent, vrf that have not been able to be
associated with netns are removed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: sometimes, it is not possible to assign a NSID to a vrf
Philippe Guibert [Wed, 18 Jul 2018 15:58:45 +0000 (17:58 +0200)]
zebra: sometimes, it is not possible to assign a NSID to a vrf

This test case happens in scenarios with mininet, where external netns
may be impossible for the local instance to be modified. The error is
ignored and the netns parsed is ignored too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoMerge pull request #2673 from opensourcerouting/stable/5.0-fix-isis-issue-2584
Donald Sharp [Fri, 20 Jul 2018 05:52:53 +0000 (01:52 -0400)]
Merge pull request #2673 from opensourcerouting/stable/5.0-fix-isis-issue-2584

Stable/5.0: Fix issue with p2p interfaces on FreeBSD

6 years agoisisd: don't crash when isis_sock_init fails 2673/head
Christian Franke [Tue, 17 Jul 2018 19:14:54 +0000 (15:14 -0400)]
isisd: don't crash when isis_sock_init fails

When isis_sock_init fails in isis_circuit_up, isis_circuit_down would
be called to cancel timers which were scheduled. However
isis_circuit_down would immediately return, since the state had not been
changed to 'UP' yet.

Fix this by having isis_circuit_down always cancel all the timers.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoMerge pull request #2649 from LabNConsulting/working/5.0/add_version_type_dev_check
Martin Winter [Wed, 18 Jul 2018 19:01:44 +0000 (20:01 +0100)]
Merge pull request #2649 from LabNConsulting/working/5.0/add_version_type_dev_check

5.0: Simplify deprecation check

6 years ago*: ignore deprecated code statments in release versions (by setting CONFDATE to 0) 2649/head
Lou Berger [Tue, 10 Jul 2018 20:09:08 +0000 (16:09 -0400)]
*: ignore deprecated code statments in release versions (by setting CONFDATE to 0)

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoMerge pull request #2629 from pguibert6WIND/misc_bgp_zebra_doc
Quentin Young [Fri, 6 Jul 2018 15:19:10 +0000 (11:19 -0400)]
Merge pull request #2629 from pguibert6WIND/misc_bgp_zebra_doc

Misc bgp zebra doc

6 years agodoc: clean up flowspec.rst 2629/head
Quentin Young [Mon, 2 Jul 2018 19:22:12 +0000 (19:22 +0000)]
doc: clean up flowspec.rst

* Fix broken citations
* Remove trailing whitespace
* Rewrap to 80 lines
* Tweak capitalization of section headers
* Clean up a few indented blocks

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2616 from ajones-rvbd/ajones-issue-2375-5
Quentin Young [Thu, 5 Jul 2018 21:39:42 +0000 (17:39 -0400)]
Merge pull request #2616 from ajones-rvbd/ajones-issue-2375-5

tests/isisd: bypass test_fuzz_isis_tlv when inet_ntop is broken

6 years agodoc: add BGP VRF use case
Philippe Guibert [Wed, 30 May 2018 13:15:25 +0000 (15:15 +0200)]
doc: add BGP VRF use case

This commit brings some information about BGP VRF case with peering
using multiple VRF instances.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agodoc: replace 'intact' keyword with something more clear
Philippe Guibert [Wed, 30 May 2018 09:46:13 +0000 (11:46 +0200)]
doc: replace 'intact' keyword with something more clear

Keeping the config intact might be misunderstood. I say that even if VRF
netns is automatically discovered, it is possible for administrator to
save the netns information in the config file, to bring more clarity (
hence the config commands available).

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agodoc: inform the diff between config from zebra and outside
Philippe Guibert [Wed, 30 May 2018 09:38:24 +0000 (11:38 +0200)]
doc: inform the diff between config from zebra and outside

To avoid some confusions, it is precised in the documentation that
the configuration not done from zebra will not be injected in the
configuration context. As consequence, the config file will not be
impacted by underlying network context. But also, this will not be
possible for *Zebra* to attempt to modify outside networking objects.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agodoc: add information about zebra VRF configuration
Philippe Guibert [Fri, 13 Apr 2018 14:13:23 +0000 (16:13 +0200)]
doc: add information about zebra VRF configuration

As there are subtle differences between VRF-lite and VRF-netns,
some information is given to the operator on what can be/ can not be
done.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agodoc: Explain ecmp building and startup for zebra
Donald Sharp [Tue, 1 May 2018 22:02:51 +0000 (18:02 -0400)]
doc: Explain ecmp building and startup for zebra

Explain the --enable-ecmp=X configure option as well as
modify the zebra user doc to explain the -e X option.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: add flowspec information from user point of view
Philippe Guibert [Fri, 22 Jun 2018 15:37:29 +0000 (17:37 +0200)]
doc: add flowspec information from user point of view

Add some information for BGP flowspec.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoFRRouting Release 5.0.1 frr-5.0.1
Martin Winter [Thu, 5 Jul 2018 07:40:17 +0000 (00:40 -0700)]
FRRouting Release 5.0.1

Changes since 5.0:
- Support Automake 1.16.1
- BGPd: Support for flowspec ICMP, DSCP, packet length, fragment and tcp flags
- BGPd: fix rpki validation for ipv6
- VRF: Workaround for kernel bug on Linux 4.14 and newer
- Zebra: Fix interface based routes from zebra not marked up
- Zebra: Fix large zebra memory usage when redistribute between protocols
- Zebra: Allow route-maps to match on source instance
- BGPd: Backport peer-attr overrides, peer-level enforce-first-as and filtered-routes fix
- BGPd: fix for crash during display of filtered-routes
- BGPd: Actually display labeled unicast routes received
- Label Manager: Fix to work correctly behind a label manager proxy
- Debian Package: Fix build dependency for install-info

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoMerge pull request #2617 from ajones-rvbd/ajones-issue-2403-5
Quentin Young [Tue, 3 Jul 2018 21:13:52 +0000 (17:13 -0400)]
Merge pull request #2617 from ajones-rvbd/ajones-issue-2403-5

tests: use BUILT_SOURCES in tests/Makefile.am for automake 1.16.1

6 years agoMerge pull request #2594 from pguibert6WIND/flowspec_other_options_5_0
Donald Sharp [Tue, 3 Jul 2018 15:33:14 +0000 (11:33 -0400)]
Merge pull request #2594 from pguibert6WIND/flowspec_other_options_5_0

Flowspec other options

6 years agotests: use BUILT_SOURCES in tests/Makefile.am for automake 1.16.1 2617/head
Arthur Jones [Mon, 11 Jun 2018 21:55:50 +0000 (14:55 -0700)]
tests: use BUILT_SOURCES in tests/Makefile.am for automake 1.16.1

When trying to run make check using automake 1.16.1, we get:

CC isisd/test_fuzz_isis_tlv-test_fuzz_isis_tlv.o
isisd/test_fuzz_isis_tlv.c:1:10: fatal error: test_fuzz_isis_tlv_tests.h: No such file or directory
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:1096: recipe for target 'isisd/test_fuzz_isis_tlv-test_fuzz_isis_tlv.o' failed
make[1]: *** [isisd/test_fuzz_isis_tlv-test_fuzz_isis_tlv.o] Error 1
make[1]: Leaving directory '/src/frr-frr-5.0/tests'
Makefile:1220: recipe for target 'check-am' failed
make: *** [check-am] Error 2

From reading the automake docs, it looks like there may be a more
reliable way to express built files in the Makefile.am using BUILT_SOURCES.
Using this method, we seem to build fine now on 1.16.1 and this
has been tested on Ubuntu 18.04, CentOS 7 and Alpine edge (which uses
automake 1.16.1).

NB 5.0:

This cherry-pick from master will make Alpine packaging easier

Issue: https://github.com/FRRouting/frr/issues/2403
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
6 years agotests/isisd: bypass test_fuzz_isis_tlv when inet_ntop is broken 2616/head
Arthur Jones [Wed, 6 Jun 2018 14:47:17 +0000 (07:47 -0700)]
tests/isisd: bypass test_fuzz_isis_tlv when inet_ntop is broken

On Alpine Linux edge, musl does not seem to be RFC 5952 4.2.2
compliant (how to print a single :0: in the IPv6 address).  Let's
skip that test, as we get false negatives when running against
that version of musl.

Credit for the idea for the fix and how to fix it is due to
chris@opensourcerouting.org.

NB 5.0:

This cherry-pick from master will simplify frr packaging for alpine

Testing done:

make check on alpine linux passes now

Issue: https://github.com/FRRouting/frr/issues/2375
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
6 years agoMerge pull request #2612 from rtrlib/2018-07-02-stable-50-bugfix
Donald Sharp [Mon, 2 Jul 2018 22:34:00 +0000 (18:34 -0400)]
Merge pull request #2612 from rtrlib/2018-07-02-stable-50-bugfix

bgpd: rpki bugfix rollup (stable/5.0)

6 years agobgpd: fix rpki validation for ipv6 2612/head
Marcel Röthke [Thu, 12 Apr 2018 12:13:07 +0000 (14:13 +0200)]
bgpd: fix rpki validation for ipv6

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
6 years agobgpd: fix rpki segfault
Marcel Röthke [Sun, 1 Jul 2018 20:54:51 +0000 (22:54 +0200)]
bgpd: fix rpki segfault

If a cache server was added after rpki was started it's tr_socket would
not be initialized. This would lead to a segfault if the rtr manager
ever decides to switch to that socket or if rpki support is stopped.

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
6 years agobgpd: rework enumerate function, handle not values 2594/head
Philippe Guibert [Fri, 22 Jun 2018 07:17:04 +0000 (09:17 +0200)]
bgpd: rework enumerate function, handle not values

The handling of reverse values is in a separate function.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: add an icmp flag for flowspec icmp entries
Philippe Guibert [Thu, 21 Jun 2018 10:29:18 +0000 (12:29 +0200)]
bgpd: add an icmp flag for flowspec icmp entries

Some values for icmp type/code can not be encoded like port source or
port destination. This is the case of 0 value that is authorized for
icmp.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: rework icmp enumerate list
Philippe Guibert [Wed, 20 Jun 2018 14:59:17 +0000 (16:59 +0200)]
bgpd: rework icmp enumerate list

As the other enumerate list, icmp type and code are handled as the other
combinations. The icmp type and code options are the last options to be
injected into PBR. If icmp type is present only, all the filtering will
apply to this icmp type. if icmp code is present only, then all the
combination will be done with icmp type ranging from 0 to 255 values.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: fix recursive call combination
Philippe Guibert [Wed, 20 Jun 2018 13:30:40 +0000 (15:30 +0200)]
bgpd: fix recursive call combination

The recursive algorithm was taking into account the fact that all the
bpof structures were filled in. Because the dscp value was not given,
the pkt_len parsing could not be achieved. Now the iteration takes into
account each type according to the previous one, thus guaranting all
parameters to be parsed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: handle policy routing fragment handling
Philippe Guibert [Wed, 20 Jun 2018 12:06:31 +0000 (14:06 +0200)]
zebra: handle policy routing fragment handling

incoming iptable entries with fragment parameter is handled.
An iptable context is created for each fragment value received from BGP.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: support for flowspec fragment list into policy routing
Philippe Guibert [Wed, 20 Jun 2018 11:55:20 +0000 (13:55 +0200)]
bgpd: support for flowspec fragment list into policy routing

The flowspec fragment attribute is taken into account to be pushed in
BGP policy routing entries. Valid values are enumerate list of 1, 2, 4,
or 8 values. no combined value is supported yet.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: align fragment flowspec decoding with tcpflags
Philippe Guibert [Wed, 20 Jun 2018 06:32:43 +0000 (08:32 +0200)]
bgpd: align fragment flowspec decoding with tcpflags

As fragment bitmask and tcpflags bitmask in flowspec protocol is encoded
in the same way, it is not necessary to differentiate those two fields.
Moreover, it overrides the initial fragment limit set to 1. It is now
possible to handle multiple framgent values.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: support for enumerate pkt len
Philippe Guibert [Tue, 19 Jun 2018 14:02:55 +0000 (16:02 +0200)]
bgpd: support for enumerate pkt len

The packet length can be injected from fs entry with an enumerate list;
the negation of the value is also taken into account.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: introduce recursive operations for or flowspec operations
Philippe Guibert [Tue, 19 Jun 2018 13:02:26 +0000 (15:02 +0200)]
bgpd: introduce recursive operations for or flowspec operations

So as to add or remove entries with flowspec or operations like tcp
flags or dscp enum list, a mechanism is put in place that adds
recursivity.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: enumerate support for dscp values
Philippe Guibert [Tue, 19 Jun 2018 13:02:15 +0000 (15:02 +0200)]
bgpd: enumerate support for dscp values

If one dscp value or an enumerate list of or values of dscp are
provided, then the bgp pbr entries created will take into account the
dscp values.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: add show pbr iptable dscp information
Philippe Guibert [Tue, 19 Jun 2018 12:54:59 +0000 (14:54 +0200)]
zebra: add show pbr iptable dscp information

The iptable configured with dscp displays the dscp value configured.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years ago*: add flowspec dscp handling
Philippe Guibert [Wed, 13 Jun 2018 09:59:07 +0000 (11:59 +0200)]
*: add flowspec dscp handling

Only one dscp value is accepted as filtering option.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: add a parameter to handle param or combinations
Philippe Guibert [Mon, 18 Jun 2018 09:52:19 +0000 (11:52 +0200)]
bgpd: add a parameter to handle param or combinations

Before adding/removing to zebra, flowspec entries parses the list of
combinations or avaialble and creates contexts in order to be injected
to zebra.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: use a bgp_pbr_or_filter structure to host tcpflags combinations
Philippe Guibert [Mon, 18 Jun 2018 09:50:16 +0000 (11:50 +0200)]
bgpd: use a bgp_pbr_or_filter structure to host tcpflags combinations

tcp flags combinations ( or enumerates)  are hosted in a structure that
will be analysed later, when wanting to inject that information to
zebra.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: extend enumerate API to handle or operations
Philippe Guibert [Mon, 18 Jun 2018 09:18:21 +0000 (11:18 +0200)]
bgpd: extend enumerate API to handle or operations

The flowspec enumerate list can either be and values or or values.
In the latter case, a list is created that will be used later.
Also, the API supports the check for both and or or operations. This API
does not permit to handle both and and or operations at the same time.
The list will have to be either and or or. An other API retrieves the
operator unary value that is used: and or or. or 0 is the two operators
are used at the same time.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: do not add default route for flowspec for each FS entry
Philippe Guibert [Wed, 13 Jun 2018 09:56:35 +0000 (11:56 +0200)]
bgpd: do not add default route for flowspec for each FS entry

Because the Flowspec entries are parsed first, then injected to Zebra,
there are cases where the install feedback from zebra is not received.
This leads to unnecessary add route events, whereas one should be
enough.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd, lib: share flags values for iptable configuration
Philippe Guibert [Wed, 13 Jun 2018 09:12:08 +0000 (11:12 +0200)]
bgpd, lib: share flags values for iptable configuration

Those flags can be shared between BGP and Zebra. That is why
those flags are moved to common pbr.h header file.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: handling of policy routing iptable tcpflags
Philippe Guibert [Tue, 12 Jun 2018 16:32:21 +0000 (18:32 +0200)]
zebra: handling of policy routing iptable tcpflags

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: support for flowspec tcp flags
Philippe Guibert [Tue, 12 Jun 2018 16:31:52 +0000 (18:31 +0200)]
bgpd: support for flowspec tcp flags

Ability to handle flowspec tcp flags.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: fix display with flowspec tcp flags option
Philippe Guibert [Tue, 12 Jun 2018 16:26:35 +0000 (18:26 +0200)]
bgpd: fix display with flowspec tcp flags option

When displaying RIB FS summary, the TCP option is not displayed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: simplify API in BGP policy-routing to handle Flowspec
Philippe Guibert [Tue, 12 Jun 2018 12:45:35 +0000 (14:45 +0200)]
bgpd: simplify API in BGP policy-routing to handle Flowspec

To handle FS params between FS RIB and BGP PBR entities, a structure
intermediate named bgp_pbr_filter is used, and contains all filtering
information that was before passed as a parameter.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: add packet length into pbr support
Philippe Guibert [Mon, 11 Jun 2018 13:30:11 +0000 (15:30 +0200)]
zebra: add packet length into pbr support

The packet length is added to iptable zapi message.
Then the iptable structure is taking into account the pkt_len field.
The show pbr iptable command displays the packet length used if any.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: add debug routine to display which PBR entry is handled
Philippe Guibert [Mon, 11 Jun 2018 13:41:57 +0000 (15:41 +0200)]
bgpd: add debug routine to display which PBR entry is handled

To know which entry is set/unset, a debug handler is present, that
displays which entry is injected/removed to/from zebra.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: add support of bgp flowspec filtering per packet length
Philippe Guibert [Mon, 11 Jun 2018 13:35:37 +0000 (15:35 +0200)]
bgpd: add support of bgp flowspec filtering per packet length

It is possible to do filtering based on packet length value or a range
of packet-length.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: add comment to inform that icmp can be stored in that struct
Philippe Guibert [Mon, 4 Jun 2018 16:13:00 +0000 (18:13 +0200)]
bgpd: add comment to inform that icmp can be stored in that struct

Generic ipset entry structure will be reused to host icmp information.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobgpd: handle ICMP type and code from flowspec
Philippe Guibert [Mon, 4 Jun 2018 16:11:04 +0000 (18:11 +0200)]
bgpd: handle ICMP type and code from flowspec

It is possible for flowspec entries containing ICMP rule to insert PBR
entries based on ICMP type and ICMP code.
Flowspec ICMP filtering can either have icmp type or icmp code or both.
Not all combinations are permitted:
- if icmp code is provided, then it is not possible to derive the
  correct icmp value. This will not be installed
- range of ICMP is authorised or list of ICMP, but not both.
- on receiving a list of ICMPtype/code, each ICMP type is attempted to
  be associated to ICMP code. If not found, then ICMPtype is combined
  with all known ICMP code values associated to that ICMP type.
- if a specific ICMP type/code is needed, despite the ICMP code/type
  combination does not exist, then it is possible to do it by forging a
  FS ICMP type/code specific for that.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: improve show zebra ipset output for icmp
Philippe Guibert [Tue, 5 Jun 2018 15:01:14 +0000 (17:01 +0200)]
zebra: improve show zebra ipset output for icmp

The icmp type/code is displayed.
Also, the flags are correctly set in case ICMP protocol is elected.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>