]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agobgpd: encode implicit next-hop-self in some vrf route leaking scenarios
Don Slice [Wed, 17 Jul 2019 17:19:08 +0000 (13:19 -0400)]
bgpd: encode implicit next-hop-self in some vrf route leaking scenarios

Problem reported that when vrf route-leaking between an unnumbered
peer in one vrf to a numbered peer in another vrf, the nexthop
attribute was missing from the update, causing the session to fail.
determined that we needed to expand the  mechanism for verifying if
the route has been learned in the other vrf without an ipv4 nexthop.

Ticket: CM-25610
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #4699 from donaldsharp/tests_do_not_faile_me
Martin Winter [Mon, 22 Jul 2019 16:55:26 +0000 (18:55 +0200)]
Merge pull request #4699 from donaldsharp/tests_do_not_faile_me

Add more debugging to ci log files to figure out what is going on.

5 years agoMerge pull request #4688 from qlyoung/alpine-docker-rpki
Donatas Abraitis [Fri, 19 Jul 2019 19:21:29 +0000 (22:21 +0300)]
Merge pull request #4688 from qlyoung/alpine-docker-rpki

docker: build alpine docker w/ rpki enabled

5 years agoMerge pull request #4695 from donaldsharp/zebra_zapi_msgs
Mark Stapp [Thu, 18 Jul 2019 13:38:12 +0000 (09:38 -0400)]
Merge pull request #4695 from donaldsharp/zebra_zapi_msgs

Zebra zapi msgs - improve debugs

5 years agoTest: Add back a bit more debugging to see what is going on
Donald Sharp [Wed, 17 Jul 2019 15:23:25 +0000 (11:23 -0400)]
Test: Add back a bit more debugging to see what is going on

All debug logging has been thrown to the floor in this loop.
Add it back in and additionally add a bit more debugging to
know what is going on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4704 from mjstapp/fix_ip2str_const
Donald Sharp [Wed, 17 Jul 2019 22:59:08 +0000 (18:59 -0400)]
Merge pull request #4704 from mjstapp/fix_ip2str_const

lib: use const in ipaddr2str

5 years agolib: use const in ipaddr2str
Mark Stapp [Wed, 17 Jul 2019 20:59:41 +0000 (16:59 -0400)]
lib: use const in ipaddr2str

Use const more

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #4680 from donaldsharp/test_longer
Mark Stapp [Wed, 17 Jul 2019 17:34:51 +0000 (13:34 -0400)]
Merge pull request #4680 from donaldsharp/test_longer

tests: Topotests are not giving sufficient time to propagate data

5 years agopbrd: Do not install nexthop group until we have nexthops
Donald Sharp [Wed, 17 Jul 2019 00:41:01 +0000 (20:41 -0400)]
pbrd: Do not install nexthop group until we have nexthops

The creation of a nexthop group results in a callback with
just the nexthop group name.  At this point in time we
do not have any nexthop information so there is nothing to
install.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Print out client who sent us bad data
Donald Sharp [Wed, 17 Jul 2019 00:24:26 +0000 (20:24 -0400)]
zebra: Print out client who sent us bad data

A client was sending zebra a route with no nexthops!  Update the
error message to tell us *Which* daemon is doing this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Guard debug messages
Donald Sharp [Wed, 17 Jul 2019 00:17:05 +0000 (20:17 -0400)]
zebra: Guard debug messages

A bunch of debug code has snuck in that is unguarded.
Fix this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4685 from chiragshah6/ospf_vrf_dev
Russ White [Tue, 16 Jul 2019 23:50:23 +0000 (19:50 -0400)]
Merge pull request #4685 from chiragshah6/ospf_vrf_dev

ospfd: no router ospf crash fix

5 years agoMerge pull request #4669 from opensourcerouting/bfd-isis-northbound
Russ White [Tue, 16 Jul 2019 13:17:51 +0000 (09:17 -0400)]
Merge pull request #4669 from opensourcerouting/bfd-isis-northbound

isisd: migrate BFD command to northbound

5 years agoMerge pull request #4684 from donaldsharp/various_fixes
Russ White [Tue, 16 Jul 2019 13:14:30 +0000 (09:14 -0400)]
Merge pull request #4684 from donaldsharp/various_fixes

Various fixes

5 years agoMerge pull request #4635 from AnuradhaKaruppiah/evpn-pim-replay
Jafar Al-Gharaibeh [Mon, 15 Jul 2019 20:40:12 +0000 (15:40 -0500)]
Merge pull request #4635 from AnuradhaKaruppiah/evpn-pim-replay

pimd, zebra: request for replay of VxLAN SG entries on pimd startup

5 years agoMerge pull request #4687 from qlyoung/fix-test-ntop-strlen-assert
Mark Stapp [Mon, 15 Jul 2019 19:25:09 +0000 (15:25 -0400)]
Merge pull request #4687 from qlyoung/fix-test-ntop-strlen-assert

tests: remove strlen assert in inet_ntop tests

5 years agodocker: build alpine docker w/ rpki enabled
Quentin Young [Mon, 15 Jul 2019 17:18:30 +0000 (17:18 +0000)]
docker: build alpine docker w/ rpki enabled

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agotests: remove strlen assert in inet_ntop tests
Quentin Young [Mon, 15 Jul 2019 17:16:30 +0000 (17:16 +0000)]
tests: remove strlen assert in inet_ntop tests

Some platform libc's like to render some v6 addresses as v4 mapped where
others render the same addresses as v6 with leading zeroes. Binary
equivalence checks pass but strlen checks sometimes fail here. Remove
assert causing the failure.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoospfd: no router ospf crash fix
Chirag Shah [Fri, 12 Jul 2019 02:36:06 +0000 (19:36 -0700)]
ospfd: no router ospf crash fix

no router ospf triggers to cancel all threads
including read/write (receive/send packets) threads,
cleans up resources fd, message queue and data.

Last job of write (packet) thread invoked where the
ospf instance is referenced is not running nor
the socket fd valid.

Write thread callback should check if fd is valid and
ospf instance is running before proceeding to send a
message over socket.

Ticket:CM-20095
Testing Done:

Performed the multiple 'no router ospf' with the fix
in topology where the crash was seen.
Post fix the crash is not observed.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agovtysh: Make nexthop-group submode line unique
Donald Sharp [Sat, 13 Jul 2019 19:37:02 +0000 (15:37 -0400)]
vtysh: Make nexthop-group submode line unique

Now that multiple daemons understand nexthop-groups, we need
to ensure that vtysh doesn't double print out the individual
nexthops that are part of a nexthop-group.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Modify way we query for inteface speed
Donald Sharp [Sat, 13 Jul 2019 19:28:50 +0000 (15:28 -0400)]
zebra: Modify way we query for inteface speed

Initial commit of understanding interface speed changes
on startup was this commit:

dc7b3caefbd8baccb7fc3787a774e78d1a96636f

Effectively we had encountered situations on system startup
where the interface speed for a device was not properly setup
when zebra learns about the interface ( Imagine a bond being
brought up and the controlling software creating the bond
is not fast given system load, the bond's speed changes
upwards for each interface added ).

The initial workup on this was to allow a 15 second window
and then just reread the interface speed.  We've since noticed
that under heavy system load on startup this is not always sufficient.

So modify the code to wait the 15 seconds and then check the interfaces
speed.  If the interfaces speed is still MAX_UINT32T or it has changed
let's wait a bit longer and try again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4658 from chiragshah6/ospf_vrf_dev
Jafar Al-Gharaibeh [Fri, 12 Jul 2019 22:30:42 +0000 (17:30 -0500)]
Merge pull request #4658 from chiragshah6/ospf_vrf_dev

ospfd: fix various show ip ospf neighbor json commands

5 years agoisisd: improvements based on feedback
Rafael Zalamena [Fri, 12 Jul 2019 20:24:17 +0000 (17:24 -0300)]
isisd: improvements based on feedback

  * Remove sanity checks that are already done by northbound;
  * Show error message on circuit absence;
  * Use a better idiom for the configuration display code;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #4660 from manuhalo/label_manager_fixes
Renato Westphal [Fri, 12 Jul 2019 20:09:33 +0000 (17:09 -0300)]
Merge pull request #4660 from manuhalo/label_manager_fixes

Label manager improvements + refactor

5 years agoMerge pull request #4664 from sworleys/Zvrf-Debug-Guard
Renato Westphal [Fri, 12 Jul 2019 19:40:50 +0000 (16:40 -0300)]
Merge pull request #4664 from sworleys/Zvrf-Debug-Guard

zebra: Add a conditional guard if zvrf lookup fail

5 years agoMerge pull request #4325 from sworleys/Order-Recv-Nexthops
Renato Westphal [Fri, 12 Jul 2019 18:25:37 +0000 (15:25 -0300)]
Merge pull request #4325 from sworleys/Order-Recv-Nexthops

zebra: Modify zebra to order nexthops received

5 years agoMerge pull request #4674 from mjstapp/fix_mono_ctime
Quentin Young [Thu, 11 Jul 2019 20:05:03 +0000 (16:05 -0400)]
Merge pull request #4674 from mjstapp/fix_mono_ctime

lib,zebra: avoid use of ctime in monotime api

5 years agotests: Topotests are not giving sufficient time to propagate data
Donald Sharp [Thu, 11 Jul 2019 18:40:31 +0000 (14:40 -0400)]
tests: Topotests are not giving sufficient time to propagate data

A bunch of our current tests setup data and redistribute
it across some bgp connections and then test for it
being there.  A delay of 2 seconds that was initially
there to ensure that the data has propagated does not
actually work all the time when you have a loaded
virtualized environment.

Make the sleep 10 seconds.  I agree this is not the ideal
solution but I would rather get the damn tests up and running
again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4670 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Wed, 10 Jul 2019 20:39:26 +0000 (13:39 -0700)]
Merge pull request #4670 from chiragshah6/evpn_dev1

bgpd: fix show bgp l2vpn evpn route json

5 years agoMerge pull request #4675 from mgsmith1000/bgp_restart_timer_inbound
Donald Sharp [Wed, 10 Jul 2019 20:27:24 +0000 (16:27 -0400)]
Merge pull request #4675 from mgsmith1000/bgp_restart_timer_inbound

bgpd: honor max prefix timer on inbound sessions

5 years agolib,zebra: avoid use of ctime in monotime api
Mark Stapp [Wed, 10 Jul 2019 14:16:59 +0000 (10:16 -0400)]
lib,zebra: avoid use of ctime in monotime api

Replace a call to ctime with ctime_r in the monotime module;
update the callers of the monotime api.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agotests: remove lm-proxy-topo1 topotest
Emanuele Di Pascale [Wed, 10 Jul 2019 13:50:22 +0000 (15:50 +0200)]
tests: remove lm-proxy-topo1 topotest

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agoldpd: set default instance to 1
Emanuele Di Pascale [Wed, 10 Jul 2019 13:20:14 +0000 (15:20 +0200)]
ldpd: set default instance to 1

LDP opens two sockets to zebra, one through ldpd (always using
instance 0) and another through lde (using whatever instance
was set through the -n command line parameter). If no instance
was set, both connections would use the same protocol and instance,
making it impossible to distinguish them through zserv_find_client.
This meant that a response to a lm connect would erroneously go to
the wrong process. Fix this by having a default instance value of 1,
in case the user does not specify a different one.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agozebra: label manager refactor
Emanuele Di Pascale [Thu, 27 Jun 2019 08:11:35 +0000 (10:11 +0200)]
zebra: label manager refactor

in order to both streamline the code and allow users to
define their own specialized versions of the LM api handlers,
define hooks for the 4 main primitives offered by the label
manager (i.e. connect, disconnect, get_chunk and release_chunk),
and have the existing code be run in response to a hook_call.
Additionally, have the responses to the requesting daemon be
callable from an external API.

Note that the proxy version of the label manager was a source of
issues and hardly used in practice. With the new hooks, users with
more complex requirements can simply plug in their own code to
handle label distribution remotely, so there is no longer a reason
to maintain this code.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agotests: remove test_lblmgr.c
Emanuele Di Pascale [Fri, 28 Jun 2019 08:01:56 +0000 (10:01 +0200)]
tests: remove test_lblmgr.c

This is not part of the make check tests and it has been broken
for a while, apparently. The way the label manager is coded makes
it very hard to code unit tests, and testing the relay of requests
to an external label manager is probably better done through
a topotest, so remove this.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agolib, zebra: handle failure in get chunk
Emanuele Di Pascale [Thu, 27 Jun 2019 08:59:22 +0000 (10:59 +0200)]
lib, zebra: handle failure in get chunk

when requesting a specific label chunk (e.g. for the SRGB),
it might happen that we cannot get what we want. In this
event, we must be prepared to receive a response with no
label chunk. Without this fix, if the remote label manager
was not able to alloate the chunk we requested, we would
hang indefinitely trying to read data from the stream which
was not there.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agolib, zebra: support label chunk requests for SRGB
Emanuele Di Pascale [Wed, 12 Jun 2019 14:33:12 +0000 (16:33 +0200)]
lib, zebra: support label chunk requests for SRGB

For SRGB, we need to support chunk requests starting at a
specific point in the label space, rather than just asking
for any sufficiently large chunk. To this purpose, we extend
the label manager api to request a chunk with a base value;
if the base is set to 0, the label manager will behave as it
currently does, i.e. fetching the first free chunk big enough
to satisfy the request.

update all the existing calls to get chunks from the label
manager so that they use MPLS_LABEL_BASE_ANY as the base
for the requested chunk

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agobgpd: honor max prefix timer on inbound sessions
Matthew Smith [Tue, 9 Jul 2019 17:59:44 +0000 (12:59 -0500)]
bgpd: honor max prefix timer on inbound sessions

When using the maximum-prefix restart option with a BGP peer,
if the peer exceeds the limit of prefixes, bgpd causes the
connection to be closed and sets a timer. It will not attempt
to connect to that peer until the timer expires. But if the
peer attempts to connect to it before the timer expires, it
accepts the connection and starts exchanging routes again.

When accepting a connection from a peer, reject the connection
if the max prefix restart timer is set.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
5 years agoospfd: fix show ip ospf neigh json
Chirag Shah [Fri, 5 Jul 2019 22:45:56 +0000 (15:45 -0700)]
ospfd: fix show ip ospf neigh json

Same ospf neigbor can be learnt via multiple
interfaces, ospf detail json only displayed
last instance only.

Fix json output format to contain "neighbors"
keyword, under which to display all neighbors
for a given vrf.

Fix
show ip ospf neighbor detail json
show ip ospf neighbor detail all json
show ip ospf neighbor <intf name> detail json

Ticket:CM-25528
Reviewed By:
Testing Done:

Run the output with JSON formatter and the output
has passed.

switch1# show ip ospf vrf all neighbor detail json
{
  "default":{
    "vrfName":"default",
    "vrfId":0,
    "neighbors":{
      "0.0.0.2":[
        {
          "ifaceAddress":"14.0.0.22",
          "areaId":"0.0.0.0",
          "ifaceName":"Bridge1.510",
          "nbrPriority":1,
          "nbrState":"Full",
          "stateChangeCounter":6,
          "lastPrgrsvChangeMsec":82668,
          "routerDesignatedId":"14.0.0.22",
          "routerDesignatedBackupId":"14.0.0.21",
          "optionsCounter":2,
          "optionsList":"*|-|-|-|-|-|E|-",
          "routerDeadIntervalTimerDueMsec":36195,
          "databaseSummaryListCounter":0,
          "linkStateRequestListCounter":0,
          "linkStateRetransmissionListCounter":0,
          "threadInactivityTimer":"on",
          "threadLinkStateRequestRetransmission":"on",
          "threadLinkStateUpdateRetransmission":"on",
          "peerBfdInfo":{
            "type":"single hop",
            "detectMultiplier":4,
            "rxMinInterval":600,
            "txMinInterval":800,
            "status":"Down",
            "lastUpdate":"0:00:00:29"
          }
        },
        {
          "ifaceAddress":"14.0.0.26",
          "areaId":"0.0.0.0",
          "ifaceName":"Bridge1.511",
          "nbrPriority":1,
          "nbrState":"Full",
          "stateChangeCounter":6,
          "lastPrgrsvChangeMsec":82658,
          "routerDesignatedId":"14.0.0.26",
          "routerDesignatedBackupId":"14.0.0.25",
          "optionsCounter":2,
          "optionsList":"*|-|-|-|-|-|E|-",
          "routerDeadIntervalTimerDueMsec":36196,
          "databaseSummaryListCounter":0,
          "linkStateRequestListCounter":0,
          "linkStateRetransmissionListCounter":0,
          "threadInactivityTimer":"on",
          "threadLinkStateRequestRetransmission":"on",
          "threadLinkStateUpdateRetransmission":"on"
        },
     ]
    }
  }
}

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agobgpd: fix show bgp l2vpn evpn route json
Chirag Shah [Tue, 9 Jul 2019 18:51:46 +0000 (11:51 -0700)]
bgpd: fix show bgp l2vpn evpn route json

PR-4544 has introduced a new filed extended community
in show bgp l2vpn evpn route command.
The header has missed checking json is enabled.

Ticket:CM-25581
Reviewed By:
Testing Done:

TORS1# show bgp l2vpn evpn route json
{
  "27.0.0.15:8":{
    "rd":"27.0.0.15:8",
    "[2]:[0]:[48]:[00:02:00:00:00:0a]":{
      "prefix":"[2]:[0]:[48]:[00:02:00:00:00:0a]",
      "prefixLen":288,
      "paths":[
        [
          {
            "valid":true,
            "bestpath":true,
            "pathFrom":"external",
            "routeType":2,
            "ethTag":0,
            "macLen":48,
            "mac":"00:02:00:00:00:0a",
            "weight":32768,
            "peerId":"(unspec)",
            "aspath":"",
            "path":"",
            "origin":"IGP",
            "extendedCommunity":{
              "string":"ET:8 RT:5550:1002"
            },
            "nexthops":[
              {
                "ip":"27.0.0.15",
                "afi":"ipv4",
                "used":true
              }
            ]
          }
        ]
      ]
    },
   ...
  },
  "numPrefix":187,
  "numPaths":343
}

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoisisd: fix compilation warning on OpenBSD
Rafael Zalamena [Tue, 9 Jul 2019 16:41:08 +0000 (13:41 -0300)]
isisd: fix compilation warning on OpenBSD

Use different declaration style to fix compilation warning on OpenBSD.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoisisd: migrate BFD command to northbound
Rafael Zalamena [Wed, 12 Jun 2019 18:20:17 +0000 (15:20 -0300)]
isisd: migrate BFD command to northbound

Specify the ISIS BFD command in the YANG model and implement the
northbound callbacks.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agozebra: Add a conditional guard if zvrf lookup fail
Stephen Worley [Tue, 9 Jul 2019 15:10:49 +0000 (11:10 -0400)]
zebra: Add a conditional guard if zvrf lookup fail

Add a conditional to guard against segfaulting on the debug
statement when zvrf lookup fails.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agoMerge pull request #4619 from opensourcerouting/eigrpd-yang
Russ White [Tue, 9 Jul 2019 15:27:02 +0000 (11:27 -0400)]
Merge pull request #4619 from opensourcerouting/eigrpd-yang

yang: import EIGRP YANG model

5 years agoMerge pull request #4609 from ton31337/fix/show_set_comm-list_delete
Quentin Young [Tue, 9 Jul 2019 15:25:10 +0000 (11:25 -0400)]
Merge pull request #4609 from ton31337/fix/show_set_comm-list_delete

bgpd: Show `delete` sub-option for `set [l]comm-list <list> delete`

5 years agoisisd: move old BFD command to fabricd only
Rafael Zalamena [Wed, 12 Jun 2019 18:18:19 +0000 (15:18 -0300)]
isisd: move old BFD command to fabricd only

The `isisd` will receive a northbound version of the BFD command, so
this is the first step to implement it.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #4437 from opensourcerouting/bfdd-northbound
Russ White [Tue, 9 Jul 2019 15:15:51 +0000 (11:15 -0400)]
Merge pull request #4437 from opensourcerouting/bfdd-northbound

bfdd: migrate to northbound

5 years agoMerge pull request #4088 from opensourcerouting/bump-libyang-requirement-vers
Jafar Al-Gharaibeh [Tue, 9 Jul 2019 14:59:17 +0000 (17:59 +0300)]
Merge pull request #4088 from opensourcerouting/bump-libyang-requirement-vers

build, lib: bump libyang requirement version to >= 0.16.105 (-r3)

5 years agozebra: Modify zebra to order nexthops received
Donald Sharp [Thu, 24 Jan 2019 15:13:22 +0000 (10:13 -0500)]
zebra: Modify zebra to order nexthops received

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4655 from qlyoung/fix-vrrp-iface-del-infiniteloop
Renato Westphal [Tue, 9 Jul 2019 14:21:44 +0000 (11:21 -0300)]
Merge pull request #4655 from qlyoung/fix-vrrp-iface-del-infiniteloop

vrrpd: set interface ifindex to internal upon deletion

5 years agoMerge pull request #4511 from pguibert6WIND/flowspec_some_fixes
Russ White [Tue, 9 Jul 2019 14:12:21 +0000 (10:12 -0400)]
Merge pull request #4511 from pguibert6WIND/flowspec_some_fixes

Flowspec some fixes

5 years agoyang/eigrp: change active-time timer to seconds
Rafael Zalamena [Tue, 2 Jul 2019 15:20:20 +0000 (12:20 -0300)]
yang/eigrp: change active-time timer to seconds

Based on feedback.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: keep source information for single hop
Rafael Zalamena [Mon, 8 Jul 2019 18:56:56 +0000 (15:56 -0300)]
bfdd: keep source information for single hop

Add source address to northbound when creating sessions with this
information. It is not possible to change source address after the
session was created, but we should be able to set it to make IPv6 work.

Spotted by Philippe Guibert.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoyang: change single hop `leaf` order
Rafael Zalamena [Mon, 8 Jul 2019 20:38:28 +0000 (17:38 -0300)]
yang: change single hop `leaf` order

Move `source-address` to after the list keys, otherwise the CLI would
get into an invalid state and be unable to set any other configuration
inside that node.

Spotted by Philippe Guibert.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #4643 from pguibert6WIND/pytest_compat
Martin Winter [Tue, 9 Jul 2019 12:42:55 +0000 (14:42 +0200)]
Merge pull request #4643 from pguibert6WIND/pytest_compat

doc: inform user to use pytest < version 5.0

5 years agoMerge pull request #4446 from Kuldeepkas/topojson
Martin Winter [Tue, 9 Jul 2019 12:41:11 +0000 (14:41 +0200)]
Merge pull request #4446 from Kuldeepkas/topojson

topotests: Topojson framework

5 years agoMerge pull request #4657 from qlyoung/cleanup-protonum-vrrrrrrrrrrrrrrrrrrrrrrrrrrrrr...
Philippe Guibert [Tue, 9 Jul 2019 10:27:11 +0000 (11:27 +0100)]
Merge pull request #4657 from qlyoung/cleanup-protonum-vrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrp

vrrpd: use protocol number constant

5 years agotests: Fix info messages print in std_error
Ashish Pant [Tue, 9 Jul 2019 04:49:56 +0000 (10:19 +0530)]
tests: Fix info messages print in std_error

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
frr-reolad.py invocation sends info message to stderror channel
Redirected stderror from frr-reload.py to stdout

Fixed verify_convergence when more than one link is present

5 years agotests: Fix logdir creation
Ashish Pant [Tue, 25 Jun 2019 05:56:46 +0000 (11:26 +0530)]
tests: Fix logdir creation

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Creates logdir everytime in start_topology, removed stop_topoloy.
Using tgen.stop_topology in test case now.

5 years agodoc: Document for topojson changes
Ashish Pant [Tue, 25 Jun 2019 05:02:49 +0000 (10:32 +0530)]
doc: Document for topojson changes

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Describes topojson framework and guidelines to use it.

5 years agotests: Adding example cases for topojson
Ashish Pant [Tue, 25 Jun 2019 04:25:24 +0000 (09:55 +0530)]
tests: Adding example cases for topojson

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Example JSON and test cases for 3 types being added:
1. Single link between routers
2. Multiple linke between routers.
3. BGP session over loopback interface

5 years agotests: Adding bgp path attribute tests
Ashish Pant [Tue, 25 Jun 2019 02:12:44 +0000 (07:42 +0530)]
tests: Adding bgp path attribute tests

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding multiple test cases for bgp attributes.
Adding verfication APIs for them.

5 years agotests: Fixing ipv6 address generation
Ashish Pant [Tue, 25 Jun 2019 02:00:08 +0000 (07:30 +0530)]
tests: Fixing ipv6 address generation

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
5 years agotests: Adding bgp tests for prefix-lists
Ashish Pant [Tue, 25 Jun 2019 01:56:20 +0000 (07:26 +0530)]
tests: Adding bgp tests for prefix-lists

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adds mulitple test scenarios for prefix-lists in bgp. Verfication
API for prefix-lits

Also adds description for bgp-basic test suite

5 years agotests: Adding 5 test cases to bgp-basic suite
Ashish Pant [Tue, 25 Jun 2019 01:03:09 +0000 (06:33 +0530)]
tests: Adding 5 test cases to bgp-basic suite

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding test cases and verfication API for new test cases

5 years agotests: Adding timers and bgp 4 bytes ASN test
Ashish Pant [Tue, 25 Jun 2019 00:34:17 +0000 (06:04 +0530)]
tests: Adding timers and bgp 4 bytes ASN test

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding verify and config apis for bgp timer testcase
Adding verify and config apis for changing ASN to 4 bytes

5 years agotests: Adding API for route-map
Ashish Pant [Mon, 24 Jun 2019 23:51:22 +0000 (05:21 +0530)]
tests: Adding API for route-map

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding API for reading JSON data and configuring route-map on the
router

5 years agotests: Adding API for prefix-list configuration
Ashish Pant [Mon, 24 Jun 2019 23:46:32 +0000 (05:16 +0530)]
tests: Adding API for prefix-list configuration

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding API for prefix-list that reads data from JSON and configures
on the router.

5 years agotests: Adding API for static route
Ashish Pant [Mon, 24 Jun 2019 23:35:15 +0000 (05:05 +0530)]
tests: Adding API for static route

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding API for reading data from JSON and configuring static
routes on the router

5 years agotests: First test case and JSON
Ashish Pant [Mon, 24 Jun 2019 20:43:13 +0000 (02:13 +0530)]
tests: First test case and JSON

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adds verification API for bgp, first test case alongwith JSON file

5 years agotests: Adding api for BGP configuration
Ashish Pant [Mon, 24 Jun 2019 11:54:07 +0000 (17:24 +0530)]
tests: Adding api for BGP configuration

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding mulitple methods to form BGP configuration and other
helper methods.
If "bgp" is given in JSON the configuration will be created

5 years agotests: Adds basic config load and interface API
Ashish Pant [Mon, 24 Jun 2019 11:37:00 +0000 (17:07 +0530)]
tests: Adds basic config load and interface API

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adds method to load configuration on the router. Save configuration
for resetting.
Adds method for configuring interfaces ip address on router.
Adds logdir and other pytest.ini option

5 years agotests: Adding start and stop topology
Ashish Pant [Mon, 24 Jun 2019 11:26:08 +0000 (16:56 +0530)]
tests: Adding start and stop topology

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding methods for staring and stopping routers in topology

5 years agotests: Intial commit for topojson
Ashish Pant [Mon, 24 Jun 2019 11:04:36 +0000 (16:34 +0530)]
tests: Intial commit for topojson

Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Adding JSON parser for creating router and assinging ip addresses to
each interface

5 years agovrrpd: use protocol number constant
Quentin Young [Mon, 8 Jul 2019 21:28:01 +0000 (21:28 +0000)]
vrrpd: use protocol number constant

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4654 from manuhalo/fix_bgp_lbp_warn
Donald Sharp [Mon, 8 Jul 2019 19:27:35 +0000 (15:27 -0400)]
Merge pull request #4654 from manuhalo/fix_bgp_lbp_warn

bgpd: fix implicit declaration warning

5 years agoMerge pull request #4631 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Mon, 8 Jul 2019 18:56:44 +0000 (11:56 -0700)]
Merge pull request #4631 from chiragshah6/evpn_dev1

zebra: evpn entries are not cleaned upon frr stop

5 years agovrrpd: set interface ifindex to internal upon deletion
Quentin Young [Mon, 8 Jul 2019 18:35:14 +0000 (18:35 +0000)]
vrrpd: set interface ifindex to internal upon deletion

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4653 from qlyoung/fix-pim-helpstringms
Mark Stapp [Mon, 8 Jul 2019 17:44:06 +0000 (13:44 -0400)]
Merge pull request #4653 from qlyoung/fix-pim-helpstringms

pimd: fix some help strings

5 years agobgpd: fix implicit declaration warning
Emanuele Di Pascale [Mon, 8 Jul 2019 16:45:14 +0000 (18:45 +0200)]
bgpd: fix implicit declaration warning

Add header with prototype for bgp_path_info_unlock

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agoMerge pull request #4652 from LabNConsulting/working/master/hook_unregister
Quentin Young [Mon, 8 Jul 2019 15:33:07 +0000 (11:33 -0400)]
Merge pull request #4652 from LabNConsulting/working/master/hook_unregister

bgp: add hook_unregister to bgp_dump_finish

5 years agobgp: add hook_unregister to bgp_dump_finish
Lou Berger [Mon, 8 Jul 2019 13:24:57 +0000 (09:24 -0400)]
bgp: add hook_unregister to bgp_dump_finish

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgpd: extend bgp routemap prefix-list to flowspec entries
Donald Sharp [Fri, 14 Jun 2019 10:05:18 +0000 (06:05 -0400)]
bgpd: extend bgp routemap prefix-list to flowspec entries

Some code to cleanup bgp routemap.c a bit.
Addint to this, if a bgp flowspec entry contains a destination IP address,
then the ip address is compared against the prefix-list referenced into
the route-map used.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Donald Sharp <sharpd@cumulunetworks.com>
5 years agobgpd: discard traffic when at least traffic-rate 0 is observed
Philippe Guibert [Thu, 6 Jun 2019 15:14:36 +0000 (17:14 +0200)]
bgpd: discard traffic when at least traffic-rate 0 is observed

when multiple action rules are analysed in the BGP flowspec entry, if at
least the traffic-rate set to 0 is seen, then immediately create a rule
with drop rule. Previously this was not the case in case a forwarding
rule was seen.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgp, zebra, lib: add protocol support for iptables
Philippe Guibert [Thu, 6 Jun 2019 15:31:46 +0000 (17:31 +0200)]
bgp, zebra, lib: add protocol support for iptables

in addition to support for tcpflags, it is possible to filter on any
protocol. the filtering can then be based with iptables.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agopimd: fix some help strings
Quentin Young [Sat, 6 Jul 2019 00:15:27 +0000 (00:15 +0000)]
pimd: fix some help strings

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: inform user to use pytest < version 5.0
Philippe Guibert [Thu, 4 Jul 2019 17:50:49 +0000 (19:50 +0200)]
doc: inform user to use pytest < version 5.0

pytest intends to deprecate users not having python 2 on the system.
in order to make topotest work, just use an older pytest version.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #4639 from opensourcerouting/c-ares-lib
Quentin Young [Wed, 3 Jul 2019 20:49:19 +0000 (16:49 -0400)]
Merge pull request #4639 from opensourcerouting/c-ares-lib

make c-ares DNS resolver available as lib

5 years agoMerge pull request #4640 from opensourcerouting/bmp-prep
Quentin Young [Wed, 3 Jul 2019 20:42:41 +0000 (16:42 -0400)]
Merge pull request #4640 from opensourcerouting/bmp-prep

bgpd: BMP preparations

5 years agoMerge pull request #4632 from manuhalo/fix_bgp_lu_update
Quentin Young [Wed, 3 Jul 2019 18:25:18 +0000 (14:25 -0400)]
Merge pull request #4632 from manuhalo/fix_bgp_lu_update

bgpd: fix bgp-lu update bug

5 years agoMerge pull request #4637 from opensourcerouting/fixes-20190703
Quentin Young [Wed, 3 Jul 2019 17:28:23 +0000 (13:28 -0400)]
Merge pull request #4637 from opensourcerouting/fixes-20190703

isisd printfrr & clippy fixes

5 years agopimd, zebra: request for replay of SG entries on startup
Anuradha Karuppiah [Tue, 2 Jul 2019 18:20:34 +0000 (11:20 -0700)]
pimd, zebra: request for replay of SG entries on startup

zvni setup in zebra is controlled via bgpd i.e. advertise_all_vni
from bgpd triggers this setup. As a part of zvni creation we may need
to setup BUM mcast SG entries which are propagated to pimd for MDT setup.

Now pimd may not be present at the time of zvni creation or may restart
post zvni creation so we need a mechanism to replay (on pimd startup) and
to cleanup (on pimd stop). This is addressed via zebra_vxlan_sg_replay and
zebra_evpn_pim_cfg_clean_up.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
5 years agoMerge pull request #4641 from qlyoung/remove-zebra-bs-irdp
Mark Stapp [Wed, 3 Jul 2019 17:05:04 +0000 (13:05 -0400)]
Merge pull request #4641 from qlyoung/remove-zebra-bs-irdp

zebra: remove bs irdp error code

5 years agoMerge pull request #4629 from ton31337/fix/large_community_list_uint16_overflow
Quentin Young [Wed, 3 Jul 2019 16:30:21 +0000 (12:30 -0400)]
Merge pull request #4629 from ton31337/fix/large_community_list_uint16_overflow

bgpd: Validate large-community-list against UINT_MAX

5 years agoMerge pull request #4638 from donaldsharp/ospf_external_delete_crash
David Lamparter [Wed, 3 Jul 2019 16:02:29 +0000 (18:02 +0200)]
Merge pull request #4638 from donaldsharp/ospf_external_delete_crash

ospfd: Do not modify list when using _RO loop

5 years agolib/resolver: NULL out callback before call
David Lamparter [Thu, 23 May 2019 12:25:58 +0000 (14:25 +0200)]
lib/resolver: NULL out callback before call

The callback itself might want to reschedule the resolver, so it is
useful to clear out the callback field before making the call instead of
after.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: split off c-ares code from nhrpd
David Lamparter [Thu, 23 May 2019 10:23:02 +0000 (12:23 +0200)]
lib: split off c-ares code from nhrpd

This is useful in other places too, e.g. for BMP outbound connections.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobgpd: add packet send hook
David Lamparter [Fri, 10 May 2019 17:29:01 +0000 (19:29 +0200)]
bgpd: add packet send hook

Unlike MRT dumps, BMP also provides packets sent by the router.  Add
another hook for that.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobgpd: add & use bgp packet dump hook
David Lamparter [Wed, 24 Apr 2019 15:19:09 +0000 (17:19 +0200)]
bgpd: add & use bgp packet dump hook

The MRT dump code is already hooked in at the right places to write out
packets;  the BMP code needs exactly the same access so let's make this
a hook.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
5 years agobgpd: add instance delete & config write hooks
David Lamparter [Fri, 10 May 2019 13:31:04 +0000 (15:31 +0200)]
bgpd: add instance delete & config write hooks

Both of these hooks are necessary for proper operation of extensions
that need to latch on to a particular instance.

- without the delete hook, it's impossible to get rid of stale
  references, leading to crashes with invalid instance pointers.
- the config-write hook is necessary because per-instance config needs
  to be written inside the "router bgp" block to have the appropriate
  context; adding a separate config node can't do that.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>