]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #5112 from qlyoung/cli-reject-ipv4-leading-zero
Jafar Al-Gharaibeh [Mon, 7 Oct 2019 20:05:09 +0000 (13:05 -0700)]
Merge pull request #5112 from qlyoung/cli-reject-ipv4-leading-zero

lib: reject leading 0 in ipv4 decimal quad

5 years agoMerge pull request #5105 from donaldsharp/watchfrr_more_systemd_status
Donatas Abraitis [Mon, 7 Oct 2019 17:46:46 +0000 (20:46 +0300)]
Merge pull request #5105 from donaldsharp/watchfrr_more_systemd_status

lib, watchfrr: Add some additional status messages to systemd

5 years agoMerge pull request #5106 from ton31337/fix/maximum-prefix_uint16_to_uint32
Quentin Young [Mon, 7 Oct 2019 16:33:04 +0000 (12:33 -0400)]
Merge pull request #5106 from ton31337/fix/maximum-prefix_uint16_to_uint32

bgpd: Use uint32_t for maximum-prefix

5 years agolib: reject leading 0 in ipv4 decimal quad
Quentin Young [Mon, 7 Oct 2019 15:36:39 +0000 (15:36 +0000)]
lib: reject leading 0 in ipv4 decimal quad

inet_pton() is used to parse ipv4 addresses internally, therefore FRR
does not support octal notation for quads. The ipv4 cli token validator
should make sure that str2prefix() can parse tokens it allows, and
str2prefix uses inet_pton, so we have to disallow leading zeros in ipv4
quads.

In short, 1.1.1.01 is no longer valid and must be expressed as 1.1.1.1.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4964 from ashish12pant/ecmp_tests
Martin Winter [Fri, 4 Oct 2019 19:02:27 +0000 (21:02 +0200)]
Merge pull request #4964 from ashish12pant/ecmp_tests

tests: Fix bgp-ecmp-topo2

5 years agoMerge branch 'master' into ecmp_tests
Martin Winter [Fri, 4 Oct 2019 13:19:17 +0000 (15:19 +0200)]
Merge branch 'master' into ecmp_tests

5 years agoMerge pull request #5005 from Frankkkkk/dockerfile
Donatas Abraitis [Fri, 4 Oct 2019 12:51:23 +0000 (13:51 +0100)]
Merge pull request #5005 from Frankkkkk/dockerfile

Make docker images lighter and with less layers

5 years agobgpd: Use uint32_t for maximum-prefix
Donatas Abraitis [Thu, 3 Oct 2019 21:30:28 +0000 (00:30 +0300)]
bgpd: Use uint32_t for maximum-prefix

Currently we have unsigned long which is not what we defined
in CLI (1-4294967295).

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #5082 from donaldsharp/add_bgp_rr_ibgp_topotest
Donatas Abraitis [Fri, 4 Oct 2019 10:32:20 +0000 (11:32 +0100)]
Merge pull request #5082 from donaldsharp/add_bgp_rr_ibgp_topotest

tests: Add a topology that shows broken ibgp Route Reflector behavior

5 years agolib, watchfrr: Add some additional status messages to systemd
Donald Sharp [Fri, 4 Oct 2019 01:09:28 +0000 (21:09 -0400)]
lib, watchfrr: Add some additional status messages to systemd

Allow systemd to be informed about operational state so operators can
infer a bit about what is going on with FRR from the systemd status
cli.

sharpd@robot ~/frr4> systemctl status frr
● frr.service - FRRouting
   Loaded: loaded (/usr/lib/systemd/system/frr.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2019-10-03 21:09:04 EDT; 7s ago
     Docs: https://frrouting.readthedocs.io/en/latest/setup.html
  Process: 32455 ExecStart=/usr/lib/frr/frrinit.sh start (code=exited, status=0/SUCCESS)
   Status: "FRR Operational"
    Tasks: 12 (limit: 4915)
   Memory: 76.5M
   CGroup: /system.slice/frr.service
           ├─32468 /usr/lib/frr/watchfrr -d zebra bgpd staticd
           ├─32487 /usr/lib/frr/zebra -d -A 127.0.0.1 -s 90000000
           ├─32492 /usr/lib/frr/bgpd -d -A 127.0.0.1
           └─32500 /usr/lib/frr/staticd -d -A 127.0.0.1

Please note the `Status: ...` line above.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5102 from donaldsharp/fix_some_warnings
Jafar Al-Gharaibeh [Thu, 3 Oct 2019 17:38:29 +0000 (10:38 -0700)]
Merge pull request #5102 from donaldsharp/fix_some_warnings

Fix some warnings

5 years agoMerge pull request #5103 from donaldsharp/doc_dont
Donatas Abraitis [Thu, 3 Oct 2019 15:58:11 +0000 (18:58 +0300)]
Merge pull request #5103 from donaldsharp/doc_dont

doc: Add some additional warnings around Turning off bgp capabilities

5 years agoMerge pull request #5079 from mjstapp/fix_dplane_drop_at_shut
Donald Sharp [Thu, 3 Oct 2019 15:49:07 +0000 (11:49 -0400)]
Merge pull request #5079 from mjstapp/fix_dplane_drop_at_shut

zebra: during shutdown processing, drop dplane results

5 years agodoc: Add some additional warnings around Turning off bgp capabilities
Donald Sharp [Thu, 3 Oct 2019 13:26:46 +0000 (09:26 -0400)]
doc: Add some additional warnings around Turning off bgp capabilities

FRR supports the ability to turn off the negotation of bgp capabilities.
Provide a few bread crumbs to the operator that it might not be as
useful as they would hope.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: bgp pointer may be null
Donald Sharp [Thu, 3 Oct 2019 12:57:55 +0000 (08:57 -0400)]
bgpd: bgp pointer may be null

The bgp pointer may not be actually found.  The debug
message that was using it could get the same value
another way.  Convert over

Fixes Coverity Scan Issue:

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Show to compiler that uint64_t -> uint32_t is ok here
Donald Sharp [Thu, 3 Oct 2019 12:55:29 +0000 (08:55 -0400)]
bgpd: Show to compiler that uint64_t -> uint32_t is ok here

We only have a uint32_t value here but clippy is wise and
gives us more data than we need. Tell the compiler we can
throw some stuff away.

This was found by inspecting CI results.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotests: Enabling bgp-ecmp-topo2 test cases
Ashish Pant [Tue, 24 Sep 2019 04:50:08 +0000 (10:20 +0530)]
tests: Enabling bgp-ecmp-topo2 test cases

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
5 years agotests: Modify json for bgp-ecmp-topo2
Ashish Pant [Thu, 12 Sep 2019 04:41:59 +0000 (10:11 +0530)]
tests: Modify json for bgp-ecmp-topo2

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Modified json files to configure route-map which prefer global
address

5 years agotests: Add topojson route-map for nexthop
Ashish Pant [Thu, 12 Sep 2019 04:30:00 +0000 (10:00 +0530)]
tests: Add topojson route-map for nexthop

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Add route-map option for ipv6 nexthop

Fix typo in bgp configuration

5 years agotests: Fix topojson link local ipv6 address
Ashish Pant [Thu, 12 Sep 2019 04:24:44 +0000 (09:54 +0530)]
tests: Fix topojson link local ipv6 address

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Removed code that disabled link local ipv6 address on the interface

5 years agoMerge pull request #5095 from donaldsharp/static_fix_for_ROUTE_ALL
Jafar Al-Gharaibeh [Wed, 2 Oct 2019 16:30:36 +0000 (09:30 -0700)]
Merge pull request #5095 from donaldsharp/static_fix_for_ROUTE_ALL

ZEBRA_ROUTE_ALL fix

5 years agozebra: Fix redistribution deletion for ZEBRA_ROUTE_ALL
Donald Sharp [Wed, 2 Oct 2019 13:29:19 +0000 (09:29 -0400)]
zebra: Fix redistribution deletion for ZEBRA_ROUTE_ALL

commit ee8a72f315013aecd45bc9c3aaf7ea81b2ca747a

broke the usage of ZEBRA_ROUTE_ALL as a valid redistribution
command.  This commit puts it back in.  LDP uses ZEBRA_ROUTE_ALL
as an option to say it is interested in all REDISTRIBUTION events.

Fixes: #5072
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agosharpd: Start infrastructure to allow for redistribution testing
Donald Sharp [Wed, 2 Oct 2019 13:27:04 +0000 (09:27 -0400)]
sharpd: Start infrastructure to allow for redistribution testing

Start the work in sharpd to allow the testing of redistribution
of routes.  Namely telling zebra to tell us about redistribution events
via the callback.

Future work here will allow sharpd to specify the redistribution
events it wants and to allow us to track that via counters.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5090 from sworleys/Fix-Vrf_ID-Decode
Sri Mohana Singamsetty [Wed, 2 Oct 2019 02:22:53 +0000 (19:22 -0700)]
Merge pull request #5090 from sworleys/Fix-Vrf_ID-Decode

lib: Decode vrf_id update appropriately from zapi

5 years agoMerge pull request #5087 from opensourcerouting/topotest-skip-on-assert-failure
Donald Sharp [Tue, 1 Oct 2019 23:14:11 +0000 (19:14 -0400)]
Merge pull request #5087 from opensourcerouting/topotest-skip-on-assert-failure

topotests: skip tests when any assert fails

5 years agolib: Decode vrf_id update appropriately from zapi
Stephen Worley [Tue, 1 Oct 2019 23:02:33 +0000 (19:02 -0400)]
lib: Decode vrf_id update appropriately from zapi

The vrf_id in `zsend_interface_vrf_update()` is encoded as
a long via `stream_putl()`, we should decode it as such
as well.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #5086 from cfra/fix/isis-threeway
Donald Sharp [Tue, 1 Oct 2019 13:00:32 +0000 (09:00 -0400)]
Merge pull request #5086 from cfra/fix/isis-threeway

isisd: Fix handling of neighbor circuit id in three way handshake

5 years agotests: Add a topology that shows broken ibgp behavior
Donald Sharp [Mon, 30 Sep 2019 12:49:40 +0000 (08:49 -0400)]
tests: Add a topology that shows broken ibgp behavior

In a leaf/spine topology with only IBGP connections, where
the same network is being redistributed at multiple points
in the network ( say a redistribute connected at both leaf and spines )
we end up in a state where zebra gets very confused.

eva# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

C>* 192.168.1.0/24 is directly connected, tor1-eth0, 00:00:30
C>* 192.168.2.0/24 is directly connected, tor1-eth1, 00:00:30
B   192.168.3.0/24 [200/0] via 192.168.4.2 inactive, 00:00:25
                           via 192.168.6.2 inactive, 00:00:25
B>* 192.168.4.0/24 [200/0] via 192.168.2.3, tor1-eth1, 00:00:25
  *                        via 192.168.6.2 inactive, 00:00:25
C>* 192.168.5.0/24 is directly connected, tor1-eth2, 00:00:30
B>* 192.168.6.0/24 [200/0] via 192.168.4.2 inactive, 00:00:25
  *                        via 192.168.5.4, tor1-eth2, 00:00:25

Effectively we have ibgp routes recursing through ibgp routes
and there is no metric to discern whom to listen to.

This draft:
https://tools.ietf.org/html/draft-ietf-idr-bgp-optimal-route-reflection-19

appears to address this issue.  From looking at both cisco and arista
deployments they are handling this issue by having the route reflector
prefer the localy learned routes over from their clients.

Add this topology, in a broken state, so that when we do fix this issue
it is a simple matter of touching this topology up and re-adding it
to the normal daily builds.  I also wanted to add this topology
since it is in a state of `doneness` and I wanted to move onto
my normal day job without having to remember about this test.

This topology is not configured to be run as part of the normal
topotests.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoisisd: Fix handling of neighbor circuit id in three way handshake
Christian Franke [Mon, 30 Sep 2019 23:53:44 +0000 (01:53 +0200)]
isisd: Fix handling of neighbor circuit id in three way handshake

RFC 5303 states:

      If the system ID and Extended Local Circuit ID of the neighboring
      system are known (in adjacency three-way state Initializing or
      Up), the neighbor's system ID SHALL be reported in the Neighbor
      System ID field, and the neighbor's Extended Local Circuit ID
      SHALL be reported in the Neighbor Extended Local Circuit ID field.

There is nothing written about only setting the Extended circuit ID of the
adjacency only when we bring the three-way adjacency up.

In fact, we should always update it, to avoid the problem described in #4783.

Fixes: #4783
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoMerge pull request #5085 from qlyoung/strip-trailing-whitespace-2019
Renato Westphal [Tue, 1 Oct 2019 01:53:56 +0000 (22:53 -0300)]
Merge pull request #5085 from qlyoung/strip-trailing-whitespace-2019

*: strip trailing whitespace

5 years agotopotests: skip tests when any assert fails
Rafael Zalamena [Tue, 1 Oct 2019 00:15:15 +0000 (21:15 -0300)]
topotests: skip tests when any assert fails

When an `assert` fails we should skip all other tests on the file. Once
a failure is detected we can't rely on the setup anymore, since most of
the tests assume the previous worked.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #5011 from karamalla0406/evpn_cli_json
Russ White [Mon, 30 Sep 2019 22:30:28 +0000 (18:30 -0400)]
Merge pull request #5011 from karamalla0406/evpn_cli_json

bgpd: Fixed 'show bgp l2vpn evpn json' to display all routes

5 years agoMerge pull request #5081 from pguibert6WIND/show_brief_doc
Quentin Young [Mon, 30 Sep 2019 19:06:42 +0000 (15:06 -0400)]
Merge pull request #5081 from pguibert6WIND/show_brief_doc

doc: add vty command information about brief usage

5 years ago*: strip trailing whitespace
Quentin Young [Mon, 30 Sep 2019 16:44:43 +0000 (16:44 +0000)]
*: strip trailing whitespace

Some of it has snuck by CI

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #5060 from chiragshah6/evpn_dev2
Sri Mohana Singamsetty [Mon, 30 Sep 2019 16:12:51 +0000 (09:12 -0700)]
Merge pull request #5060 from chiragshah6/evpn_dev2

zebra: fix evpn prefix-routes-only for default vrf

5 years agoMerge pull request #5009 from donaldsharp/interface_deletion
Russ White [Mon, 30 Sep 2019 11:46:19 +0000 (07:46 -0400)]
Merge pull request #5009 from donaldsharp/interface_deletion

lib, zebra: Allow for interface deletion when kernel event happens

5 years agodoc: add vty command information about brief usage
Philippe Guibert [Mon, 30 Sep 2019 07:33:48 +0000 (09:33 +0200)]
doc: add vty command information about brief usage

brief keyword can be used along with vrf NAME or vrf all.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agozebra: during shutdown processing, drop dplane results
Mark Stapp [Fri, 27 Sep 2019 16:15:34 +0000 (12:15 -0400)]
zebra: during shutdown processing, drop dplane results

Don't process dataplane results in zebra during shutdown (after
sigint has been seen). The dplane continues to run in order to
clean up, but zebra main just drops results.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agodocker/debian: Make docker images lighter and with less layers
Frank Villaro-Dixon [Wed, 18 Sep 2019 13:02:52 +0000 (15:02 +0200)]
docker/debian: Make docker images lighter and with less layers

Signed-off-by: Frank Villaro-Dixon <frank.villaro@infomaniak.com>
5 years agoMerge pull request #5066 from ak503/libfrr_crash
Donald Sharp [Thu, 26 Sep 2019 23:32:41 +0000 (19:32 -0400)]
Merge pull request #5066 from ak503/libfrr_crash

zebra: if_is_loopback_or_vrf crash if if_lookup_by_index return NULL

5 years agoMerge pull request #5067 from ton31337/fix/no_aggregate-address_command_for_route-map
Donald Sharp [Thu, 26 Sep 2019 21:40:41 +0000 (17:40 -0400)]
Merge pull request #5067 from ton31337/fix/no_aggregate-address_command_for_route-map

bgpd: Accept no aggregate-address <IP> route-map <RMAP> commands

5 years agoMerge pull request #5070 from ton31337/fix/aggregate-address_for_ipv6_summary-only_mi...
Donald Sharp [Thu, 26 Sep 2019 21:39:09 +0000 (17:39 -0400)]
Merge pull request #5070 from ton31337/fix/aggregate-address_for_ipv6_summary-only_missreading

bgpd: aggregate-address X:X::X:X/M summary-only was missreading config

5 years agoMerge pull request #5068 from donaldsharp/summary_only_is_not_a_route_map
Donatas Abraitis [Thu, 26 Sep 2019 18:53:50 +0000 (21:53 +0300)]
Merge pull request #5068 from donaldsharp/summary_only_is_not_a_route_map

bgpd: aggregate-address A.B.C.D A.B.C.D summary-only was missreading …

5 years agobgpd: aggregate-address X:X::X:X/M summary-only was missreading config
Donatas Abraitis [Thu, 26 Sep 2019 18:47:55 +0000 (21:47 +0300)]
bgpd: aggregate-address X:X::X:X/M summary-only was missreading config

Entering:
aggregate-address 2a02:4780::/48 summary-only

Will transform this to:
aggregate-address 2a02:4780::/48 summary-only route-map summary-only

This patch fixes that.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: aggregate-address A.B.C.D A.B.C.D summary-only was missreading config
Donald Sharp [Thu, 26 Sep 2019 16:37:28 +0000 (12:37 -0400)]
bgpd: aggregate-address A.B.C.D A.B.C.D summary-only was missreading config

The `aggregate-address 30.0.5.0 255.255.255.0 summary-only` command
was missreading the inputed data and translating it into:

`aggregate-address 30.0.5.0/24 summary-only route-map summary-only`

This is not quite correct.  Fix this behavior:

donna.cumulusnetworks.com# conf
donna.cumulusnetworks.com(config)# router bgp
donna.cumulusnetworks.com(config-router)# aggregate-address 30.0.5.0 255.255.255.0 summary-only
donna.cumulusnetworks.com(config-router)# do show run
Building configuration...

Current configuration:
!
frr version 7.3-dev
frr defaults datacenter
hostname donna.cumulusnetworks.com
log file /var/log/frr/frr.log
no ipv6 forwarding
frr version 7.2-dev
!
router bgp 500
 neighbor 192.168.209.1 remote-as external
 neighbor 192.168.209.1 ebgp-multihop 255
 neighbor 192.168.210.1 remote-as external
 !
 address-family ipv4 unicast
  network 192.168.9.0/24
  network 192.168.10.0/24
  aggregate-address 30.0.5.0/24 summary-only
 exit-address-family
!

Issue: #5054
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Accept no aggregate-address <IP> route-map <RMAP> commands
Donatas Abraitis [Thu, 26 Sep 2019 14:35:25 +0000 (17:35 +0300)]
bgpd: Accept no aggregate-address <IP> route-map <RMAP> commands

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agozebra: if_is_loopback_or_vrf crash if if_lookup_by_index return NULL
dturlupov [Thu, 26 Sep 2019 11:21:30 +0000 (14:21 +0300)]
zebra: if_is_loopback_or_vrf crash if if_lookup_by_index return NULL

Function if_lookup_by_index() can return NULL, but in if_is_loopback_or_vrf() we don't chech NULL and get next:

Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(zlog_backtrace_sigsafe+0x48) [0x7fb5f704cf18]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(zlog_signal+0x378) [0x7fb5f704d728]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(+0x6b495) [0x7fb5f706b495]
Sep 2 07:44:34 XXX zebra[4616]: /lib64/libpthread.so.0(+0x123b0) [0x7fb5f6d573b0]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(if_is_loopback+0) [0x7fb5f7045160]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(if_is_loopback_or_vrf+0x11) [0x7fb5f7045191]
Sep 2 07:44:34 XXX zebra[4616]: /usr/sbin/zebra() [0x43b26d]
Sep 2 07:44:34 XXX zebra[4616]: /usr/sbin/zebra() [0x43db6f]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(work_queue_run+0xc8) [0x7fb5f7080de8]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(thread_call+0x47) [0x7fb5f7077d27]
Sep 2 07:44:34 XXX zebra[4616]: /usr/lib64/libfrr.so.0(frr_run+0xd8) [0x7fb5f704b448]

Signed-off-by: Dmitrii Turlupov dturlupov@factor-ts.ru
5 years agoMerge pull request #5062 from kuldeepkash/route_map
Donald Sharp [Thu, 26 Sep 2019 13:05:57 +0000 (09:05 -0400)]
Merge pull request #5062 from kuldeepkash/route_map

Add bgp route-map test cases

5 years agotests: Add bgp route-map test cases
Kuldeep Kashyap [Wed, 25 Sep 2019 11:56:13 +0000 (11:56 +0000)]
tests: Add bgp route-map test cases

Adding 27 bgp route-map test cases to test multiple route-map scenarios

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agotests: Add API to shut/noshut router interface
Kuldeep Kashyap [Wed, 25 Sep 2019 11:53:00 +0000 (11:53 +0000)]
tests: Add API to shut/noshut router interface

This API would help to shut/nohut specified router interfaces

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agotests: Adding verification APIs for bgp route-maps and community-lists
Kuldeep Kashyap [Wed, 25 Sep 2019 11:49:48 +0000 (11:49 +0000)]
tests: Adding verification APIs for bgp route-maps and community-lists

APIs to verify bgp route-maps, bgp community and large community configurations

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agotests: Enhance support to create bgp community-list or large-community-list
Kuldeep Kashyap [Wed, 25 Sep 2019 11:47:25 +0000 (11:47 +0000)]
tests: Enhance support to create bgp community-list or large-community-list

Adding new API to create bgp community-list or large-community-list

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agotests: Enhance framework to create and delete route-map
Kuldeep Kashyap [Wed, 25 Sep 2019 11:39:08 +0000 (11:39 +0000)]
tests: Enhance framework to create and delete route-map

Added APIs to create and delete route-maps configuration

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agotests: Add route-map to initial config creation from JSON
Kuldeep Kashyap [Wed, 25 Sep 2019 11:24:56 +0000 (11:24 +0000)]
tests: Add route-map to initial config creation from JSON

To enable route-map config build from JSON

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agotests: Adding API verify_bgp_attributes() to bgp.py
Kuldeep Kashyap [Wed, 25 Sep 2019 11:16:44 +0000 (11:16 +0000)]
tests: Adding API verify_bgp_attributes() to bgp.py

This API is to verify BGP attribute values set by route maps

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
5 years agoMerge pull request #5047 from dslicenc/bgp-next-hop-routemap
Donatas Abraitis [Thu, 26 Sep 2019 08:17:51 +0000 (11:17 +0300)]
Merge pull request #5047 from dslicenc/bgp-next-hop-routemap

bgpd: stop sending nexthop set by "route-map in" to eBGP peers

5 years agobgpd: stop sending nexthop set by "route-map in" to eBGP peers
Don Slice [Tue, 24 Sep 2019 12:02:02 +0000 (05:02 -0700)]
bgpd: stop sending nexthop set by "route-map in" to eBGP peers

Problem reported that when a "neighbor x.x.x.x route-map FOO in"
set a next-hop value, that modified next-hop value was also sent
to eBGP peers.  This is incorrect since bgp is expected to set
next-hop to self when sending to eBGP peers unless third party
next-hop on a shared segment is true.  This fix modifies the
behavior to stop sending the modified next-hop to eBGP peers
if the route-map was applied inbound on another peer.

Ticket: CM-26025
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #5058 from mjstapp/fix_dplane_config_handler
Donald Sharp [Wed, 25 Sep 2019 20:47:47 +0000 (16:47 -0400)]
Merge pull request #5058 from mjstapp/fix_dplane_config_handler

zebra: handle config write for dataplane values

5 years agoMerge pull request #5051 from idryzhov/fix-vrf-autocomplete
Donald Sharp [Wed, 25 Sep 2019 19:27:55 +0000 (15:27 -0400)]
Merge pull request #5051 from idryzhov/fix-vrf-autocomplete

*: fix missing VRF autocompletions

5 years agozebra: fix evpn prefix-routes-only for default vrf
Chirag Shah [Wed, 25 Sep 2019 18:48:45 +0000 (11:48 -0700)]
zebra: fix evpn prefix-routes-only for default vrf

asymmetric routing default vrf vni configuration
is not displayed as part of running-config.

Ticket:CM-26470
Reviewed By:
Testing Done:

T11# config t
T11(config)# vni 4004 prefix-routes-only
T11(config)# end

Before:

T11# show running-config
...
vni 4004
...

After:

T11# show running-config
...
vni 4004 prefix-routes-only
...

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agozebra: handle config write for dataplane values
Mark Stapp [Wed, 25 Sep 2019 18:05:50 +0000 (14:05 -0400)]
zebra: handle config write for dataplane values

Add the (single) dataplane config value to the output of
config write, 'show run' - missed this during dplane development.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #5053 from donaldsharp/more_sa_stuff_this_evening
Mark Stapp [Wed, 25 Sep 2019 15:23:49 +0000 (11:23 -0400)]
Merge pull request #5053 from donaldsharp/more_sa_stuff_this_evening

More sa stuff this evening

5 years agoMerge pull request #5055 from pguibert6WIND/fix_memory_leak_with_delete_interface
Mark Stapp [Wed, 25 Sep 2019 14:03:26 +0000 (10:03 -0400)]
Merge pull request #5055 from pguibert6WIND/fix_memory_leak_with_delete_interface

zebra: fix memory leak

5 years agoMerge pull request #5052 from mjstapp/zebra_yang_model
Donald Sharp [Wed, 25 Sep 2019 13:27:57 +0000 (09:27 -0400)]
Merge pull request #5052 from mjstapp/zebra_yang_model

libs: add yang models for zebra and nexthop

5 years agopimd: up->channel_oil cannot be NULL
Donald Sharp [Wed, 25 Sep 2019 00:48:56 +0000 (20:48 -0400)]
pimd: up->channel_oil cannot be NULL

When we create the up data structure we create the channel_oil
as well.  As such it is impossible to get into this code
so it can be removed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoeigrpd: On creation of socket ensure vrf exists
Donald Sharp [Wed, 25 Sep 2019 00:48:10 +0000 (20:48 -0400)]
eigrpd: On creation of socket ensure vrf exists

If the vrf does not exist, politely do not create
the socket.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoospf6d: Prevent use after free
Donald Sharp [Wed, 25 Sep 2019 00:40:08 +0000 (20:40 -0400)]
ospf6d: Prevent use after free

the for (ALL_LSDB...) macro was iterating over lsa,
when lsa had just been freed in these functions.
Remove the macro and make the adjustments saving lsa_next
before the free.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoisisd: circuit is derefed in every code path
Donald Sharp [Tue, 24 Sep 2019 23:34:39 +0000 (19:34 -0400)]
isisd: circuit is derefed in every code path

No need to check for circuit being null, we have
already de-refed it in every code path and
would have crashed before this point if it was.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5036 from indigo423/issue/5035
Donatas Abraitis [Wed, 25 Sep 2019 07:02:31 +0000 (10:02 +0300)]
Merge pull request #5036 from indigo423/issue/5035

build: Fix Docker based Alpine build

5 years agozebra: fix memory leak
Philippe Guibert [Wed, 25 Sep 2019 06:51:06 +0000 (08:51 +0200)]
zebra: fix memory leak

the if_lookup_by_name_per_ns keeps a lock on the node where the
searched ifp is stored. Then this node can not be freed even if
the ifp is removed from the node. Just add the missing unlock
(as for the if_lookup_by_index_per_ns lookup function)

Fixes: b8af3fbbafc8 ("zebra: fix detection of interface renames")
Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agolibs: add yang models for zebra and nexthop
Mark Stapp [Tue, 24 Sep 2019 20:31:12 +0000 (16:31 -0400)]
libs: add yang models for zebra and nexthop

Add a yang model for some of zebra's functionality,
but the model is not integrated into the build at all yet. Also
add a model for nexthop and nexthop-group.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #5050 from LabNConsulting/working/lb/tt-update
Donald Sharp [Tue, 24 Sep 2019 20:07:35 +0000 (16:07 -0400)]
Merge pull request #5050 from LabNConsulting/working/lb/tt-update

topotest: bgp_l3vpn_to_bgp_vrf allow for different interface output

5 years agoMerge pull request #4972 from mjstapp/fix_notif_installed
Donald Sharp [Tue, 24 Sep 2019 18:31:58 +0000 (14:31 -0400)]
Merge pull request #4972 from mjstapp/fix_notif_installed

zebra: route updates from dataplane need to check all nexthops

5 years agoMerge pull request #5040 from opensourcerouting/isisd-fix-validation-crash
Donald Sharp [Tue, 24 Sep 2019 18:14:56 +0000 (14:14 -0400)]
Merge pull request #5040 from opensourcerouting/isisd-fix-validation-crash

isisd: fix crash during candidate validation

5 years ago*: fix missing VRF autocompletions
Igor Ryzhov [Tue, 24 Sep 2019 16:51:46 +0000 (19:51 +0300)]
*: fix missing VRF autocompletions

Current autocompletion works only for simple "vrf NAME" case.

This commit expands it also for the following cases:
- "nexthop-vrf NAME" in staticd
- usage of $varname in many daemons

All daemons are updated to use single varname "$vrf_name".

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
5 years agoMerge pull request #4959 from pguibert6WIND/zebra_inform_layer
Russ White [Tue, 24 Sep 2019 15:46:13 +0000 (11:46 -0400)]
Merge pull request #4959 from pguibert6WIND/zebra_inform_layer

zebra: inform upper layer error when reading correct speed interface

5 years agoMerge pull request #4822 from vishaldhingra/route_agg
Russ White [Tue, 24 Sep 2019 15:40:01 +0000 (11:40 -0400)]
Merge pull request #4822 from vishaldhingra/route_agg

bgpd : route aggregation optimisation

5 years agoMerge pull request #5044 from chiragshah6/evpn_dev2
Russ White [Tue, 24 Sep 2019 14:45:56 +0000 (10:45 -0400)]
Merge pull request #5044 from chiragshah6/evpn_dev2

bgpd: fix advertise-svi-ip upon vni-svi up-down

5 years agoMerge pull request #5045 from satheeshkarra/pim_tos
Russ White [Tue, 24 Sep 2019 14:44:01 +0000 (10:44 -0400)]
Merge pull request #5045 from satheeshkarra/pim_tos

pimd: Mark Default TOS Values for PIM & IGMP Outgoing packets

5 years agoMerge pull request #4995 from opensourcerouting/ospf6d-iftype
Russ White [Tue, 24 Sep 2019 14:38:10 +0000 (10:38 -0400)]
Merge pull request #4995 from opensourcerouting/ospf6d-iftype

ospf6d: fix interface type handling

5 years agoMerge pull request #5046 from donaldsharp/sa_issues_found
Donatas Abraitis [Tue, 24 Sep 2019 14:22:46 +0000 (17:22 +0300)]
Merge pull request #5046 from donaldsharp/sa_issues_found

Sa issues found

5 years agobgpd: rmap_type is 8 bit but we have 9 bits of flags
Donald Sharp [Tue, 24 Sep 2019 12:24:10 +0000 (08:24 -0400)]
bgpd: rmap_type is 8 bit but we have 9 bits of flags

The newly added PEER_RMAP_TYPE_AGGREGATE flag is setup to
be the 9th bit:

But the flag we are putting it into:
uint8_t rmap_type;

is 8 bits.  Adjust the size.

Found by Coverity SA Scan
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopbrd: We should be looking for v4 and v6 nexthop types
Donald Sharp [Tue, 24 Sep 2019 12:20:34 +0000 (08:20 -0400)]
pbrd: We should be looking for v4 and v6 nexthop types

The code should be looking for both v4 and v6 nexthop types
instead of v4 nexthop types 2 times.

Found by Coverity SA
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4912 from lucize/carescross
Donald Sharp [Tue, 24 Sep 2019 12:14:45 +0000 (08:14 -0400)]
Merge pull request #4912 from lucize/carescross

clippy: don't fail on CARES and libcap when clippy-only selected

5 years agoMerge pull request #5039 from opensourcerouting/isisd-yang-state-data
Donald Sharp [Tue, 24 Sep 2019 11:35:34 +0000 (07:35 -0400)]
Merge pull request #5039 from opensourcerouting/isisd-yang-state-data

isisd: start implementing yang-modeled state data

5 years agobgpd : route agg. with aspath attribute is consuming lot of cycles.
vdhingra [Mon, 19 Aug 2019 07:50:56 +0000 (00:50 -0700)]
bgpd : route agg. with aspath attribute is consuming lot of cycles.

While configuring aggregate route prepare the hash table first,
then prepare the aggregated aspath value just like lcomm,
ecomm and standard community.

Signed-off-by: vishaldhingra<vdhingra@vmware.com>
5 years agobgpd : route agg. with ecomm attribute is consuming lot of cycles.
vdhingra [Mon, 19 Aug 2019 07:50:15 +0000 (00:50 -0700)]
bgpd : route agg. with ecomm attribute is consuming lot of cycles.

While configuring aggregate route prepare the hash table first,
then prepare the aggregated ecomm value and then do the
unique sort once for ecommunity.

Signed-off-by: vishaldhingra<vdhingra@vmware.com>
5 years agobgpd : route agg. with comm attr is consuming lot of cycles.
vdhingra [Mon, 19 Aug 2019 07:47:50 +0000 (00:47 -0700)]
bgpd : route agg. with comm attr is consuming lot of cycles.

While configuring aggregate route prepare the hash table
first, then prepare the aggregated standard comm value
and then do the unique sort once for standard community.

Signed-off-by: vishaldhingra<vdhingra@vmware.com>
5 years agobgpd : route agg. with lcomm attribute is consuming lot of cycles.
vdhingra [Mon, 12 Aug 2019 12:13:14 +0000 (05:13 -0700)]
bgpd : route agg. with lcomm attribute is consuming lot of cycles.

While configuring aggregate route prepare the hash table first,
then prepare the aggregated lcomm value and then do the unique
sort once for large community.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
5 years agoMerge pull request #5042 from opensourcerouting/vtysh-nb-cmds
Quentin Young [Tue, 24 Sep 2019 09:11:00 +0000 (05:11 -0400)]
Merge pull request #5042 from opensourcerouting/vtysh-nb-cmds

vtysh: add two commands from the northbound

5 years agoMerge pull request #5043 from donaldsharp/update_groups_and_coalesce_timer
Donatas Abraitis [Tue, 24 Sep 2019 07:07:40 +0000 (10:07 +0300)]
Merge pull request #5043 from donaldsharp/update_groups_and_coalesce_timer

Update groups and coalesce timer

5 years agopimd: Mark Default TOS Values for PIM & IGMP Outgoing packets
Satheesh Kumar K [Tue, 24 Sep 2019 03:45:05 +0000 (20:45 -0700)]
pimd: Mark Default TOS Values for PIM & IGMP Outgoing packets

This will facilitate the Hardware to prefer control packets over
Normal Data packets while queuing, so that during congestion, the
chance of dropping control packet will be minimised.

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
5 years agobgpd: fix advertise-svi-ip upon vni-svi up-down
Chirag Shah [Thu, 12 Sep 2019 00:29:04 +0000 (17:29 -0700)]
bgpd: fix advertise-svi-ip upon vni-svi up-down

When a VxLAN interface comes up new vni up event is sent
to bgpd, which triggers bgpd to sync advertise-svi-macip
to zebra. At this point, vni is present but the associated
SVI may not be present.
When SVI comes up, vni add event sent to bgpd (with associated
vrf update). Bgpd already has vni present so
advertise-svi-macip is not synced to Zebra.

To fix,
When advertise-svi-macip flag is synced first time, cache it in
zebra context even though vni associated SVI is not present.
when SVI comes up, interface address add event triggers
new MAC-IP route add to bgpd.

Ticket:CM-26038
Reviewed By:CCR-9254
Testing Done:

Validated via running a sequence of steps in symmetric
routing topology.
- Enable advertise-svi-macip at l2vni level under bgp default
instance (afi/safi, l2vpn/evpn)
- Flap l2vni associated SVI interface.
- Check the output of 'show bgp l2vpn evpn route' command for
MAC-IP route of the SVI's (MAC and IP address).

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoMerge pull request #5034 from opensourcerouting/rm-topotest-cruft
Donald Sharp [Mon, 23 Sep 2019 19:52:32 +0000 (15:52 -0400)]
Merge pull request #5034 from opensourcerouting/rm-topotest-cruft

tests: remove more topotest backward-compatibility cruft

5 years agodoc: Update bgp docs to have `show bgp update-group...` commands
Donald Sharp [Mon, 23 Sep 2019 18:26:03 +0000 (14:26 -0400)]
doc: Update bgp docs to have `show bgp update-group...` commands

Update the user docs to have information about the `show bgp update-group..
group of commands.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5037 from idryzhov/fix-vtysh-no-log-facility
Donatas Abraitis [Mon, 23 Sep 2019 18:23:21 +0000 (21:23 +0300)]
Merge pull request #5037 from idryzhov/fix-vtysh-no-log-facility

vtysh: fix "no log facility" command

5 years agobgpd: When displaying update group information include coalesce time
Donald Sharp [Mon, 23 Sep 2019 17:49:11 +0000 (13:49 -0400)]
bgpd: When displaying update group information include coalesce time

Include the coalesce time for the update group `show bgp update-group`
command as well as print out how long the coalesce timer waited
for on the timer pop.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Do not display 'X' as part of outgoing route-map name
Donald Sharp [Mon, 23 Sep 2019 17:46:55 +0000 (13:46 -0400)]
bgpd: Do not display 'X' as part of outgoing route-map name

The peer's outgoing routemap should not be displaying a 'X'
appended to the front of the name.  This will create
confusion.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #5021 from donaldsharp/neigh_proto
Renato Westphal [Mon, 23 Sep 2019 17:45:33 +0000 (14:45 -0300)]
Merge pull request #5021 from donaldsharp/neigh_proto

Neigh proto

5 years agoisisd: fix crash during candidate validation
Renato Westphal [Mon, 23 Sep 2019 12:37:49 +0000 (09:37 -0300)]
isisd: fix crash during candidate validation

The "abort_if_not_found" parameter of nb_running_get_entry()
should be set to true only when this function is called during the
NB_EV_APPLY phase of a northbound callback. Failure to respect this
can lead to crashes when multiple configuration changes are being
committed at the same time.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>