]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agobgpd: swap bgp error value with file descriptor value
Philippe Guibert [Thu, 23 Sep 2021 11:57:56 +0000 (13:57 +0200)]
bgpd: swap bgp error value with file descriptor value

the values were swapped by mistake. fix it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #9645 from mjstapp/fix_show_bgp_lu
Donatas Abraitis [Wed, 22 Sep 2021 06:52:09 +0000 (09:52 +0300)]
Merge pull request #9645 from mjstapp/fix_show_bgp_lu

bgpd: make show bgp labeled-unicast work

3 years agoMerge pull request #9641 from idryzhov/vtysh-vrf-sort
Donald Sharp [Tue, 21 Sep 2021 20:52:59 +0000 (16:52 -0400)]
Merge pull request #9641 from idryzhov/vtysh-vrf-sort

vtysh: remove sorting of vrf node commands

3 years agoMerge pull request #9416 from pguibert6WIND/vxlan_evpn_updates
Sri Mohana Singamsetty [Tue, 21 Sep 2021 16:26:34 +0000 (09:26 -0700)]
Merge pull request #9416 from pguibert6WIND/vxlan_evpn_updates

Vxlan evpn updates

3 years agoMerge pull request #9546 from proelbtn/add-support-for-perfix-sid-type-5
Russ White [Tue, 21 Sep 2021 15:36:53 +0000 (11:36 -0400)]
Merge pull request #9546 from proelbtn/add-support-for-perfix-sid-type-5

Add support for Prefix-SID (Type 5)

3 years agoMerge pull request #9640 from opensourcerouting/ospf6d-filters
Russ White [Tue, 21 Sep 2021 15:28:58 +0000 (11:28 -0400)]
Merge pull request #9640 from opensourcerouting/ospf6d-filters

ospf6d: rework filtering commands to be in line with ospfd

3 years agoMerge pull request #9637 from donaldsharp/intra_brouter_calc
Russ White [Tue, 21 Sep 2021 15:25:14 +0000 (11:25 -0400)]
Merge pull request #9637 from donaldsharp/intra_brouter_calc

ospf6d: Use bool instead of an int

3 years agobgpd: make show bgp labeled-unicast work
Mark Stapp [Tue, 21 Sep 2021 14:37:39 +0000 (10:37 -0400)]
bgpd: make show bgp labeled-unicast work

Yet-another path where the safi needs to be changed to locate
the unicast table where LU routes live.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
3 years agoMerge pull request #9052 from mjstapp/dplane_incoming_dev
Donald Sharp [Tue, 21 Sep 2021 14:51:37 +0000 (10:51 -0400)]
Merge pull request #9052 from mjstapp/dplane_incoming_dev

zebra: Move incoming netlink interface address change events to the dplane pthread

3 years agoMerge pull request #9642 from slrz/doc-user-routemap-mention-as-path-exclude
Donald Sharp [Tue, 21 Sep 2021 11:49:31 +0000 (07:49 -0400)]
Merge pull request #9642 from slrz/doc-user-routemap-mention-as-path-exclude

doc: mention set as-path exclude in routemap.rst

3 years agodoc: mention set as-path exclude in routemap.rst
Lars Seipel [Mon, 20 Sep 2021 18:43:58 +0000 (20:43 +0200)]
doc: mention set as-path exclude in routemap.rst

Signed-off-by: Lars Seipel <ls@slrz.net>
3 years agovtysh: remove sorting of vrf node commands
Igor Ryzhov [Wed, 15 Sep 2021 15:22:47 +0000 (18:22 +0300)]
vtysh: remove sorting of vrf node commands

A simple strcmp-based sorting done by `config_add_line_uniq` breaks the
correct advanced sorting of static routes done by staticd. We don't
actually need to check vrf node commands for uniqueness as all commands
are daemon specific, so let's use simple `config_add_line` that doesn't
sort commands.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9636 from donaldsharp/unchecked_return
Igor Ryzhov [Mon, 20 Sep 2021 17:12:54 +0000 (20:12 +0300)]
Merge pull request #9636 from donaldsharp/unchecked_return

zebra: Fix ignored return value from inet_pton

3 years agoospf6d: rework filtering commands to be in line with ospfd
Renato Westphal [Sat, 18 Sep 2021 00:45:02 +0000 (21:45 -0300)]
ospf6d: rework filtering commands to be in line with ospfd

Issue #9535 describes how the export-list/import-list commands work
differently on ospfd and ospf6d.

In short:
* On ospfd, "area A.B.C.D export-list" filters which internal
  routes an ABR exports to other areas. On ospf6d, instead, that
  command filters which inter-area routes an ABR exports to the
  configured area (which is quite counter-intuitive). In other words,
  both commands do the same but in opposite directions.
* On ospfd, "area A.B.C.D import-list" filters which inter-area
  routes an ABR imports into the configured area. On ospf6d, that
  command filters which inter-area routes an interior router accepts.
* On both daemons, "area A.B.C.D filter-list prefix NAME <in|out>"
  works exactly the same as import/export lists, but using prefix-lists
  instead of ACLs.

The inconsistency on how those commands work is undesirable. This
PR proposes to adapt the ospf6d commands to behave like they do
in ospfd.

These changes are obviously backward incompatible and this PR doesn't
propose any mitigation strategy other than warning users about the
changes in the next release notes. Since these ospf6d commands are
undocumented and work in such a peculiar way, it's unlikely many
users will be affected (if any at all).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agozebra: Fix ignored return value from inet_pton
Donald Sharp [Fri, 17 Sep 2021 16:23:37 +0000 (12:23 -0400)]
zebra: Fix ignored return value from inet_pton

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d: Use bool instead of an int
Donald Sharp [Sun, 19 Sep 2021 11:53:38 +0000 (07:53 -0400)]
ospf6d: Use bool instead of an int

intra_brouter_calc is a int that is being used a bool,
convert to a bool.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9632 from donaldsharp/no_forced_wait
Russ White [Fri, 17 Sep 2021 16:22:36 +0000 (12:22 -0400)]
Merge pull request #9632 from donaldsharp/no_forced_wait

tests: Do not do a initial_timeout of 2 seconds for verify_bgp_rib

3 years agoMerge pull request #8985 from opensourcerouting/ospf6d-gr
Russ White [Fri, 17 Sep 2021 16:22:07 +0000 (12:22 -0400)]
Merge pull request #8985 from opensourcerouting/ospf6d-gr

ospf6d: introduce support for Graceful Restart (restarting mode)

3 years agoMerge pull request #9620 from idryzhov/bgp-rmap-memleaks
Donatas Abraitis [Fri, 17 Sep 2021 12:48:25 +0000 (15:48 +0300)]
Merge pull request #9620 from idryzhov/bgp-rmap-memleaks

bgpd: fix memory leaks when using route-maps

3 years agoMerge pull request #9628 from donaldsharp/git_ignore_pcep
Donatas Abraitis [Fri, 17 Sep 2021 12:47:00 +0000 (15:47 +0300)]
Merge pull request #9628 from donaldsharp/git_ignore_pcep

*: Add some missed make check generated files in .gitignore

3 years agoMerge pull request #9629 from idryzhov/nb-cli-sort
Mark Stapp [Fri, 17 Sep 2021 12:29:00 +0000 (08:29 -0400)]
Merge pull request #9629 from idryzhov/nb-cli-sort

lib: significantly improve nb cli command sorting

3 years agolib: significantly improve nb cli command sorting
Igor Ryzhov [Thu, 16 Sep 2021 15:37:12 +0000 (18:37 +0300)]
lib: significantly improve nb cli command sorting

Instead of sorting each command one-by-one using listnode_add_sort, add
them to the list without sorting and then sort the list only once.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agozebra: refresh vxlan evpn contexts, when bridge interface goes up
Philippe Guibert [Tue, 17 Aug 2021 08:56:32 +0000 (10:56 +0200)]
zebra: refresh vxlan evpn contexts, when bridge interface goes up

When using bgp evpn rt5 setup, after BGP configuration has been
loaded, if the user attempts to detach and reattach the bridged
vxlan interface from the bridge, then BGP loses its BGP EVPN
contexts, and a refresh of BGP configuration is necessary to
maintain consistency between linux configuration and BGP EVPN
contexts (RIB). The following command can lead to inconsistency:

ip netns exec cust1 ip link set dev vxlan1000 nomaster
ip netns exec cust1 ip link set dev vxlan1000 master br1000

consecutive to the, BGP l2vpn evpn RIB is empty, and the way to
solve this until now is to reconfigure EVPN like this:

vrf cust1
 no vni 1000
 vni 1000
exit-vrf

Actually, the link information is correctly handled. In fact,
at the time of link event, the lower link status of the bridge
interface was not yet up, thus preventing from establishing
BGP EVPN contexts. In fact, when a bridge interface does not
have any slave interface, the link status of the bridge interface
is down. That change of status comes a bit after, and is not
detected by slave interfaces, as this event is not intercepted.

This commit intercepts the bridge link up event, and triggers
a check on slaved vxlan interfaces.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agozebra: handle bridge mac address update in evpn contexts
Philippe Guibert [Tue, 17 Aug 2021 08:42:51 +0000 (10:42 +0200)]
zebra: handle bridge mac address update in evpn contexts

when running bgp evpn rt5 setup, the Rmac sent in BGP updates
stands for the MAC address of the bridge interface. After
having loaded frr configuration, the Rmac address is not refreshed.
This issue can be easily reproduced by executing some commands:

ip netns exec cust1 ip link set dev br1000 address  2e:ab:45:aa:bb:cc

Actually, the BGP EVPN contexts are kept unchanged.
That commit proposes to fix this by intercepting the mac address
change, and refreshing the vxlan interfaces attached to te bridge
interface that changed its MAC address.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #9235 from AnuradhaKaruppiah/nht_mh
Sri Mohana Singamsetty [Thu, 16 Sep 2021 21:52:45 +0000 (14:52 -0700)]
Merge pull request #9235 from AnuradhaKaruppiah/nht_mh

bgpd: Extend EVPN next hop tracking to type-1 and type-4 routes

3 years agoMerge pull request #9619 from AnuradhaKaruppiah/lttng-updates
Jafar Al-Gharaibeh [Thu, 16 Sep 2021 19:55:43 +0000 (14:55 -0500)]
Merge pull request #9619 from AnuradhaKaruppiah/lttng-updates

lttng build updates

3 years agotests: Do not do a initial_timeout of 2 seconds for verify_bgp_rib
Donald Sharp [Thu, 16 Sep 2021 19:12:13 +0000 (15:12 -0400)]
tests: Do not do a initial_timeout of 2 seconds for verify_bgp_rib

A bunch of tests have this pattern:

a) Install a new prefix into bgp
b) Run this loop:
foreach (router in topology) {
verify_bgp_rib(router)
}

This is to ensure that the prefix is actually disseminated.
The problem with this, of course, is that a wait of 2 seconds
for every item in that loop makes no sense.  As that the initial
router verification of it's bgp rib will wait 2 seconds and
all the remaining bgp routers in the topology will have gotten
the data.  So we end up waiting a bunch of extra time.

Remove the initial_wait time for verify_bgp_rib.  Also
increase the failure wait time to 30 seconds.  This is
to give a bigger window for bgp to send it's data for
our test systems that could be under heavy load.  In the
normal case tests will never hit this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9627 from donaldsharp/connect_interface_based_issue
Donatas Abraitis [Thu, 16 Sep 2021 18:14:43 +0000 (21:14 +0300)]
Merge pull request #9627 from donaldsharp/connect_interface_based_issue

bgpd: Allow v6 LL peers to work when connected to as well

3 years agoMerge pull request #9489 from opensourcerouting/pim-restruct-20210825
Donald Sharp [Thu, 16 Sep 2021 16:32:45 +0000 (12:32 -0400)]
Merge pull request #9489 from opensourcerouting/pim-restruct-20210825

pimd: move IGMP memberships from socket to iface, + some cleanups

3 years agoospf6d: fix build problem with ancient json-c versions
Renato Westphal [Mon, 12 Jul 2021 12:29:06 +0000 (09:29 -0300)]
ospf6d: fix build problem with ancient json-c versions

Some CI VMs are using really old versions of json-c (pre 2013 [1])
that expect filenames to be passed as "char *" instead of "const char *".

Add some explicit casts to fix the resulting compiler errors on those
VMs (passing "char *" when the API expects "const char *" is fine).
Hopefully this commit should be reverted once the CI is updated to use
newer versions of json-c.

[1] https://github.com/json-c/json-c/commit/20e4708c

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agotests: add OSPFv3 graceful restart topotest
Renato Westphal [Wed, 30 Jun 2021 18:12:30 +0000 (15:12 -0300)]
tests: add OSPFv3 graceful restart topotest

Add a new topotest that features a topology with seven routers spread
across four OSPF areas:
* 1 backbone area;
* 1 regular non-backbone area (0.0.0.1);
* 1 stub area (0.0.0.2);
* 1 NSSA area (0.0.0.3).

All routers have both GR and GR helper functionality enabled in
the configuration. The test consists of restarting each router,
one at time, and checking that all forwarding planes (and LSDBs)
are kept intact during those restarts.

A successful run takes about three minutes to finish.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospf6d: introduce support for Graceful Restart (restarting mode)
Renato Westphal [Fri, 2 Jul 2021 16:01:32 +0000 (13:01 -0300)]
ospf6d: introduce support for Graceful Restart (restarting mode)

RFC 5187 specifies the Graceful Restart enhancement to the OSPFv3
routing protocol. This commit implements support for the GR
restarting mode.

Here's a quick summary of how the GR restarting mode works:
* GR can be enabled on a per-instance basis using the `graceful-restart
  [grace-period (1-1800)]` command;
* To perform a graceful shutdown, the `graceful-restart prepare ipv6
  ospf` EXEC-level command needs to be issued before restarting the
  ospf6d daemon (there's no specific requirement on how the daemon
  should be restarted);
* `graceful-restart prepare ospf` will initiate the graceful restart
  for all GR-enabled instances by taking the following actions:
  o Flooding Grace-LSAs over all interfaces
  o Freezing the OSPF routes in the RIB
  o Saving the end of the grace period in non-volatile memory (a JSON
    file stored in `$frr_statedir`)
* Once ospf6d is started again, it will follow the procedures
  described in RFC 3623 until it detects it's time to exit the graceful
  restart (either successfully or unsuccessfully).

Testing done:
* New topotest featuring a multi-area OSPF topology (including stub
  and NSSA areas);
* Successful interop tests against IOS-XR routers acting as helpers.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospf6d: add missing entry to array of strings
Renato Westphal [Sat, 10 Jul 2021 15:20:25 +0000 (12:20 -0300)]
ospf6d: add missing entry to array of strings

Commit b8212e0310 introduced OSPF6_SPF_FLAGS_ASBR_STATUS_CHANGE but
didn't update the 'ospf6_spf_reason_str' array accordingly. Fix this.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years ago*: Add some missed make check generated files in .gitignore
Donald Sharp [Thu, 16 Sep 2021 12:05:25 +0000 (08:05 -0400)]
*: Add some missed make check generated files in .gitignore

Some pcep log output from `make check` is showing up in
git status.  Make git know it's ok to ignore this stuff.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Allow v6 LL peers to work when connected to as well
Donald Sharp [Thu, 16 Sep 2021 12:00:44 +0000 (08:00 -0400)]
bgpd: Allow v6 LL peers to work when connected to as well

Initial commit: 8761cd6ddb5437767625f58c8e9cc3ccda7887ab

introduced the idea of v6 LL using interface up/down events
instead of nexthop resolution to know when a peering should
happen or not.  This above commit left a hole where if the remote
peer connected to this bgp, the bgp code would still believe
the peering is down.   Modify the code to double check and
ensure that we have proper v6 LL resolution flags set.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9614 from idryzhov/bgp-aspath-coverity
Donatas Abraitis [Thu, 16 Sep 2021 12:03:25 +0000 (15:03 +0300)]
Merge pull request #9614 from idryzhov/bgp-aspath-coverity

bgpd: fix coverity warning

3 years agoMerge pull request #9623 from donaldsharp/test_bgp_table
Donatas Abraitis [Thu, 16 Sep 2021 06:03:12 +0000 (09:03 +0300)]
Merge pull request #9623 from donaldsharp/test_bgp_table

tests: Fix make check builds on some bsd variants

3 years agoMerge pull request #9622 from taspelund/arp_sysctl_formatting
Donatas Abraitis [Thu, 16 Sep 2021 05:56:13 +0000 (08:56 +0300)]
Merge pull request #9622 from taspelund/arp_sysctl_formatting

doc: fixup formatting in zebra.rst

3 years agotests: Fix make check builds on some bsd variants
Donald Sharp [Thu, 16 Sep 2021 01:10:24 +0000 (21:10 -0400)]
tests: Fix make check builds on some bsd variants

Compilation is warning that a memcpy is only copying
the first (sizeof pointer) into memory.  This is not
what we really want.  Although it does beg the question about
why this memcpy is needed( or what it is doing ).  I'm going
to just fix the memcpy and call it a day.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agodoc: fixup formatting in zebra.rst
Trey Aspelund [Thu, 16 Sep 2021 00:50:55 +0000 (20:50 -0400)]
doc: fixup formatting in zebra.rst

Swap out incorrect usage of '^' with proper usage of '-'.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
3 years agoMerge pull request #9596 from LabNConsulting/ziemba/printfrr-nexthop
Donald Sharp [Thu, 16 Sep 2021 00:23:30 +0000 (20:23 -0400)]
Merge pull request #9596 from LabNConsulting/ziemba/printfrr-nexthop

printfrr %pNHcg, %pNHci

3 years agoMerge pull request #9613 from aaronpereira88/evpn-rt1-legend
Donald Sharp [Thu, 16 Sep 2021 00:22:46 +0000 (20:22 -0400)]
Merge pull request #9613 from aaronpereira88/evpn-rt1-legend

bgpd: Update route-type-1 legend to match output

3 years agoMerge pull request #9617 from idryzhov/ospf6-cleanup-om6
Donald Sharp [Thu, 16 Sep 2021 00:19:12 +0000 (20:19 -0400)]
Merge pull request #9617 from idryzhov/ospf6-cleanup-om6

ospf6d: cleanup useless checks

3 years agobgpd: fix memory leaks when using route-maps
Igor Ryzhov [Wed, 15 Sep 2021 19:45:23 +0000 (22:45 +0300)]
bgpd: fix memory leaks when using route-maps

There are places where we use route-maps using duplicated attributes and
neither intern nor flush them after the usage. If a route-map has set
rules for aspath/communities, they will be allocated and never freed.
We should always flush unneeded duplicated attributes.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agotests: include lttng libs in the bgp tests build
Anuradha Karuppiah [Wed, 15 Sep 2021 18:17:03 +0000 (11:17 -0700)]
tests: include lttng libs in the bgp tests build

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agobuild: change the lttng version requirements in frr
Anuradha Karuppiah [Tue, 14 Sep 2021 16:47:51 +0000 (09:47 -0700)]
build: change the lttng version requirements in frr

Lower the version requirements from 2.12 to 2.10

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agoospf6d: cleanup useless checks
Igor Ryzhov [Wed, 15 Sep 2021 16:21:47 +0000 (19:21 +0300)]
ospf6d: cleanup useless checks

om6->ospf6 is always initialized at the start of the execution.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9608 from idryzhov/vtysh-segfault
Stephen Worley [Wed, 15 Sep 2021 15:43:37 +0000 (11:43 -0400)]
Merge pull request #9608 from idryzhov/vtysh-segfault

lib: fix segfault on question mark on empty line

3 years agoMerge pull request #9615 from idryzhov/ospf6-null-deref
Mark Stapp [Wed, 15 Sep 2021 14:05:29 +0000 (10:05 -0400)]
Merge pull request #9615 from idryzhov/ospf6-null-deref

ospf6d: fix possible NULL dereference

3 years agoMerge pull request #9611 from donaldsharp/more_default_bull
Russ White [Wed, 15 Sep 2021 13:06:49 +0000 (09:06 -0400)]
Merge pull request #9611 from donaldsharp/more_default_bull

when doing a switch over an enumeration do not use default

3 years agobgpd: Update legend also for evpn_show_route_rd
Aaron Pereira [Wed, 15 Sep 2021 12:18:33 +0000 (05:18 -0700)]
bgpd: Update legend also for evpn_show_route_rd

Signed-off-by: Aaron Pereira <aaronpereira88@gmail.com>
3 years agoospf6d: fix possible NULL dereference
Igor Ryzhov [Wed, 15 Sep 2021 10:48:29 +0000 (13:48 +0300)]
ospf6d: fix possible NULL dereference

OSPF6_CMD_CHECK_RUNNING doesn't check that ospf6 is not NULL.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: fix coverity warning
Igor Ryzhov [Wed, 15 Sep 2021 10:21:21 +0000 (13:21 +0300)]
bgpd: fix coverity warning

CID 1506874.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9432 from taspelund/arp_sysctl_initial
Donatas Abraitis [Wed, 15 Sep 2021 07:31:40 +0000 (10:31 +0300)]
Merge pull request #9432 from taspelund/arp_sysctl_initial

vtysh/sysctl doc improvements

3 years agoMerge pull request #9393 from donaldsharp/extract_more_data
Igor Ryzhov [Tue, 14 Sep 2021 22:26:13 +0000 (01:26 +0300)]
Merge pull request #9393 from donaldsharp/extract_more_data

3 years agoMerge pull request #9410 from idryzhov/static-show-run-nb
Christian Hopps [Tue, 14 Sep 2021 20:45:28 +0000 (16:45 -0400)]
Merge pull request #9410 from idryzhov/static-show-run-nb

staticd: output config using NB callbacks instead of operational data

3 years agodoc: Expand sysctl values covered in zebra.rst
Trey Aspelund [Wed, 18 Aug 2021 00:30:21 +0000 (20:30 -0400)]
doc: Expand sysctl values covered in zebra.rst

Added references to some other sysctl knobs that influence behavior
significant to routers, e.g. arp_accept, arp_ignore, bc_forwarding.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
3 years agodoc: Add reference to vtysh in basic setup
Trey Aspelund [Tue, 17 Aug 2021 23:29:55 +0000 (19:29 -0400)]
doc: Add reference to vtysh in basic setup

Received user feedback that it was unclear how to get into the FRR
shell.  Adding a snippet to the basic setup page to help clarify.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
3 years agobgpd: Update route-type-1 legend to match output
Aaron Pereira [Tue, 14 Sep 2021 18:55:17 +0000 (11:55 -0700)]
bgpd: Update route-type-1 legend to match output

Currently the route-type-1 output has the Ethernet Tag printed first and
not the ESI.

However the legend has the opposite format

For eg:
Current legend:
EVPN type-1 prefix: [1]:[ESI]:[EthTag]:[IPlen]:[VTEP-IP]
*> [1]:[0]:[03:44:38:39:ff:ff:01:00:00:01]:[32]:[192.168.100.2]
                    192.168.100.2                          0 65002 i
                    RT:65002:100 ET:8
*> [1]:[0]:[03:44:38:39:ff:ff:01:00:00:01]:[32]:[192.168.100.3]
                    192.168.100.3                          0 65003 i
                    RT:65003:100 ET:8

Signed-off-by: Aaron Pereira <aaronpereira88@gmail.com>
3 years agozebra: Fix case default usage w/ enum's
Donald Sharp [Tue, 14 Sep 2021 17:28:00 +0000 (13:28 -0400)]
zebra: Fix case default usage w/ enum's

We should not be using `case default` with an enumerated type
This prevents the developer of new cases from knowing where
they need to fix by just compiling.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Fix usage of default
Donald Sharp [Tue, 14 Sep 2021 17:27:19 +0000 (13:27 -0400)]
lib: Fix usage of default

case default has snuck into our code base for switches
over enumerated types.  Remove.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib,doc,tests: printfrr %pNHcg, %pNHci
G. Paul Ziemba [Thu, 9 Sep 2021 15:25:03 +0000 (08:25 -0700)]
lib,doc,tests: printfrr %pNHcg, %pNHci

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
3 years agovtysh: Allow us to gather a bit more data when extract.pl dies
Donald Sharp [Fri, 13 Aug 2021 14:51:22 +0000 (10:51 -0400)]
vtysh: Allow us to gather a bit more data when extract.pl dies

When extract.pl dies, it was dieing in a manner that provided
absolutely no useful data as to what went wrong.  Let's add
a tiny bit of debug code.  So we can see what is going wrong.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: show SID structure information
Ryoga Saito [Thu, 9 Sep 2021 04:54:06 +0000 (04:54 +0000)]
bgpd: show SID structure information

Current implementation shows Prefix SID value, so SID structure
information also be shown.

Signed-off-by: Ryoga Saito <contact@proelbtn.com>
3 years agobgpd: add sid struct info to bgp_path_info_extra
Ryoga Saito [Thu, 9 Sep 2021 04:51:21 +0000 (04:51 +0000)]
bgpd: add sid struct info to bgp_path_info_extra

add SID structure information to bgp_path_info_extra to use structure
data in other places.

Signed-off-by: Ryoga Saito <contact@proelbtn.com>
3 years agoMerge pull request #9381 from AnuradhaKaruppiah/evpn-mh-display
Sri Mohana Singamsetty [Tue, 14 Sep 2021 16:39:13 +0000 (09:39 -0700)]
Merge pull request #9381 from AnuradhaKaruppiah/evpn-mh-display

bgpd: remove es_path VNI display from type-2 routes

3 years agobgpd: Extend EVPN next hop tracking to type-1 and type-4 routes
Anuradha Karuppiah [Tue, 8 Jun 2021 21:14:58 +0000 (14:14 -0700)]
bgpd: Extend EVPN next hop tracking to type-1 and type-4 routes

NH tracking is already in use for type-1, type-3 and type-5 routes.
This change extends that tracking to EAD and ESR to eliminate the 9s
delay (BGP holdtimer) with ES/L2-NHG update seen when all the uplinks
are shutdown on a remote EVPN PE.

Ticket: #2682896

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agoMerge pull request #9486 from slankdev/slankdev-srv6-no-cli-1
Igor Ryzhov [Tue, 14 Sep 2021 16:04:03 +0000 (19:04 +0300)]
Merge pull request #9486 from slankdev/slankdev-srv6-no-cli-1

CLI to delete SRv6 locator

3 years agoMerge pull request #9438 from ranjanyash54/debug_comm
Mark Stapp [Tue, 14 Sep 2021 15:38:21 +0000 (11:38 -0400)]
Merge pull request #9438 from ranjanyash54/debug_comm

ospf6d: Add debug commands for lsa all and route all

3 years agoMerge pull request #9593 from proelbtn/fix-recursive-seg6
Russ White [Tue, 14 Sep 2021 15:15:29 +0000 (11:15 -0400)]
Merge pull request #9593 from proelbtn/fix-recursive-seg6

zebra: copy nexthop_srv6 in nexthop_set_resolved

3 years agozebra: intf address handler is platform-neutral
Mark Stapp [Wed, 8 Sep 2021 19:58:04 +0000 (15:58 -0400)]
zebra: intf address handler is platform-neutral

Move the handler for incoming interface address events
to a neutral source file - it's not netlink-specific and
shouldn't have been in a netlink file.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agozebra: use the dataplane to read netlink intf addr changes
Mark Stapp [Wed, 14 Jul 2021 17:06:41 +0000 (13:06 -0400)]
zebra: use the dataplane to read netlink intf addr changes

Read incoming interface address change notifications in the
dplane pthread; enqueue the events to the main pthread
for processing. This is netlink-only for now - the bsd
kernel socket path remains unchanged.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agozebra: add interface address apis for dplane
Mark Stapp [Tue, 13 Jul 2021 20:59:46 +0000 (16:59 -0400)]
zebra: add interface address apis for dplane

Add new apis for dplane interface address handling, based on
the existing api. The existing api is basically split in two:
the first part processes an incoming netlink message in the
dplane pthread, creating a dplane context with info about
the event. The second part runs in the main pthread and uses
the context data to update an interface or connected object.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agozebra: add new dplane op codes for interface addr events
Mark Stapp [Wed, 14 Jul 2021 15:33:11 +0000 (11:33 -0400)]
zebra: add new dplane op codes for interface addr events

Add new dplane op values for incoming interface address add
and delete events.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agozebra: add intf accessors for dplane contexts
Mark Stapp [Tue, 13 Jul 2021 20:58:32 +0000 (16:58 -0400)]
zebra: add intf accessors for dplane contexts

Add a few more setters for interface data in dplane
contexts.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agozebra: replace sockunion2str in kernel_socket.c
Mark Stapp [Mon, 12 Jul 2021 20:46:44 +0000 (16:46 -0400)]
zebra: replace sockunion2str in kernel_socket.c

Use the frr format spec instead.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agolib,zebra: use more const
Mark Stapp [Thu, 8 Jul 2021 14:10:14 +0000 (10:10 -0400)]
lib,zebra: use more const

Use const in ipX_martian apis, and in some zebra apis.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agozebra: use uint32_t instead of __u32
Mark Stapp [Tue, 6 Jul 2021 15:15:14 +0000 (11:15 -0400)]
zebra: use uint32_t instead of __u32

Use more consistent int type.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agozebra: add inbound netlink socket for dataplane
Mark Stapp [Thu, 1 Jul 2021 18:29:41 +0000 (14:29 -0400)]
zebra: add inbound netlink socket for dataplane

Add a new netlink socket for events coming in from the host OS
to the dataplane system for processing. Rename the existing
outbound dplane socket.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agoMerge pull request #9602 from nkelapur/master
Donald Sharp [Tue, 14 Sep 2021 12:21:40 +0000 (08:21 -0400)]
Merge pull request #9602 from nkelapur/master

zebra: Fix IPv4 routes with IPv6 link local next hops install in FPM

3 years agolib: fix segfault on question mark on empty line
Igor Ryzhov [Tue, 14 Sep 2021 12:12:23 +0000 (15:12 +0300)]
lib: fix segfault on question mark on empty line

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9364 from LabNConsulting/ziemba/vrf_name_to_id-unknown
Igor Ryzhov [Tue, 14 Sep 2021 10:16:24 +0000 (13:16 +0300)]
Merge pull request #9364 from LabNConsulting/ziemba/vrf_name_to_id-unknown

vrf_name_to_id(): remove and change callers to use vrf_lookup_by_name()

3 years agotopotests: bgp_srv6l3vpn_to_bgp_vrf bgp locator unset test case
Hiroki Shirokura [Mon, 13 Sep 2021 23:32:09 +0000 (23:32 +0000)]
topotests: bgp_srv6l3vpn_to_bgp_vrf bgp locator unset test case

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agobgpd: add no-cli for srv6 on bgpd-side
Hiroki Shirokura [Mon, 13 Sep 2021 22:11:11 +0000 (22:11 +0000)]
bgpd: add no-cli for srv6 on bgpd-side

(1) Implement zapi wrapper func to release srv6-locator-chunk

(2) Implement no locator NAME command
router bgp 1
 segment-routing srv6
  no locator loc1

(3) Implement no segment-routing srv6 command
router bgp 1
 no segment-routing srv6

Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
3 years agoMerge pull request #9589 from donaldsharp/route_scale_cleanup
Christian Hopps [Mon, 13 Sep 2021 18:12:27 +0000 (14:12 -0400)]
Merge pull request #9589 from donaldsharp/route_scale_cleanup

tests: Break up route_scale into 2 separate tests

3 years agoMerge pull request #9587 from opensourcerouting/all-proto-test-fix
Donald Sharp [Mon, 13 Sep 2021 17:57:49 +0000 (13:57 -0400)]
Merge pull request #9587 from opensourcerouting/all-proto-test-fix

tests: Fix BGP check in all_protocol_startup

3 years agoMerge pull request #9604 from mjstapp/fix_emacs_dir_local
Donald Sharp [Mon, 13 Sep 2021 17:57:35 +0000 (13:57 -0400)]
Merge pull request #9604 from mjstapp/fix_emacs_dir_local

tests: remove python format block from dir-locals

3 years agoMerge pull request #9543 from donaldsharp/actually_set_mpls_data
Igor Ryzhov [Mon, 13 Sep 2021 16:31:53 +0000 (19:31 +0300)]
Merge pull request #9543 from donaldsharp/actually_set_mpls_data

tests: Fix wrong setting of mpls being turned on

3 years agozebra: Fix IPv4 routes with IPv6 link local next hops install in FPM
Nikhil Kelapure [Sun, 12 Sep 2021 19:25:00 +0000 (12:25 -0700)]
zebra: Fix IPv4 routes with IPv6 link local next hops install in FPM

Description: Currently IPv4 routes with IPv6 link local next hops are
not properly installed in FPM.
Reason is the netlink decoding truncates the ipv6 LL address to 4 byte
ipv4 address.

Ex : fe80:: is directly converted to ipv4 and it results in 254.128.0.0
as next hop for below routes

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, r - rejected, b - backup

B>* 2.1.0.0/16 [200/0] via fe80::268a:7ff:fed0:d40, Ethernet0, weight 1,
02:22:26
B>* 5.1.0.0/16 [200/0] via fe80::268a:7ff:fed0:d40, Ethernet0, weight 1,
02:22:26
B>* 10.1.0.2/32 [200/0] via fe80::268a:7ff:fed0:d40, Ethernet0, weight
1, 02:22:26

Hence this fix converts the ipv6-LL address to ipv4-LL (169.254.0.1)
address before sending it to FPM. This is inline with how these types of
routes are currently programmed into kernel.

Signed-off-by: Nikhil Kelapure <nikhil.kelapure@broadcom.com>
3 years agotests: remove python format block from dir-locals
Mark Stapp [Mon, 13 Sep 2021 14:04:29 +0000 (10:04 -0400)]
tests: remove python format block from dir-locals

Remove the python block from the local emacs settings file
.dir-locals.el.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
3 years agoMerge pull request #9558 from LabNConsulting/ziemba/doc-cli-new-node
Donald Sharp [Mon, 13 Sep 2021 12:36:26 +0000 (08:36 -0400)]
Merge pull request #9558 from LabNConsulting/ziemba/doc-cli-new-node

doc/developer: how to add a CLI node

3 years agoMerge pull request #9600 from kuldeepkash/cut_execution_time
Donald Sharp [Mon, 13 Sep 2021 12:35:08 +0000 (08:35 -0400)]
Merge pull request #9600 from kuldeepkash/cut_execution_time

tests: Optimize test_multicast_pim_sm_topo1.py execution time

3 years agoMerge pull request #9571 from LabNConsulting/chopps/impr-zeb-netlink
Donald Sharp [Mon, 13 Sep 2021 12:32:54 +0000 (08:32 -0400)]
Merge pull request #9571 from LabNConsulting/chopps/impr-zeb-netlink

tests: increase wait and update test

3 years agoMerge pull request #9599 from Enigamict/fixtypo
Igor Ryzhov [Mon, 13 Sep 2021 10:41:15 +0000 (13:41 +0300)]
Merge pull request #9599 from Enigamict/fixtypo

tests: fix typo in zebra.conf

3 years agoMerge pull request #9592 from ton31337/fix/bgp_neighbor_strip_whitespace
Igor Ryzhov [Mon, 13 Sep 2021 10:18:00 +0000 (13:18 +0300)]
Merge pull request #9592 from ton31337/fix/bgp_neighbor_strip_whitespace

bgpd: Do not strip peer's description by whitespace in `show bgp summary`

3 years agoMerge pull request #9586 from idryzhov/bgp-default-originate-rmap-fixes
Donatas Abraitis [Sun, 12 Sep 2021 17:50:36 +0000 (20:50 +0300)]
Merge pull request #9586 from idryzhov/bgp-default-originate-rmap-fixes

BGP default-originate with route-map fixes

3 years agoMerge pull request #9479 from AnuradhaKaruppiah/stale_path
Donatas Abraitis [Sun, 12 Sep 2021 17:48:44 +0000 (20:48 +0300)]
Merge pull request #9479 from AnuradhaKaruppiah/stale_path

zebra: Send path del to bgp for local-inactive path

3 years agoMerge pull request #9475 from iqras23/change1
Donatas Abraitis [Sun, 12 Sep 2021 17:47:18 +0000 (20:47 +0300)]
Merge pull request #9475 from iqras23/change1

bgpd: VRF-Lite fix nexthop type

3 years agotests: Optimize test_multicast_pim_sm_topo1.py
Kuldeep Kashyap [Sun, 12 Sep 2021 11:04:09 +0000 (16:34 +0530)]
tests: Optimize test_multicast_pim_sm_topo1.py

1. Optimized test: test_clear_pim_neighbors_and_mroute_p0 run time by clearing
mroute and verifying mroutes separately. Execution time is reduced from almots 10 mins
to ~220 sec.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agotests: fix typo in zebra.conf
enigamict [Fri, 10 Sep 2021 13:34:31 +0000 (22:34 +0900)]
tests: fix typo in zebra.conf

Signed-off-by: enigamict <mochienper@gmail.com>