Commit Graph

25752 Commits

Author SHA1 Message Date
Donald Sharp
b51c659775 zebra: Fix ignored return value from inet_pton
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-20 09:20:46 -04:00
Russ White
88dde69cb6
Merge pull request #9632 from donaldsharp/no_forced_wait
tests: Do not do a initial_timeout of 2 seconds for verify_bgp_rib
2021-09-17 12:22:36 -04:00
Russ White
ca45d9e5bf
Merge pull request #8985 from opensourcerouting/ospf6d-gr
ospf6d: introduce support for Graceful Restart (restarting mode)
2021-09-17 12:22:07 -04:00
Donatas Abraitis
62aaaeb122
Merge pull request #9620 from idryzhov/bgp-rmap-memleaks
bgpd: fix memory leaks when using route-maps
2021-09-17 15:48:25 +03:00
Donatas Abraitis
3b902f63c1
Merge pull request #9628 from donaldsharp/git_ignore_pcep
*: Add some missed make check generated files in .gitignore
2021-09-17 15:47:00 +03:00
Mark Stapp
1430121d57
Merge pull request #9629 from idryzhov/nb-cli-sort
lib: significantly improve nb cli command sorting
2021-09-17 08:29:00 -04:00
Igor Ryzhov
0de76236b1 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>
2021-09-17 12:00:58 +03:00
Sri Mohana Singamsetty
7f906926c7
Merge pull request #9235 from AnuradhaKaruppiah/nht_mh
bgpd: Extend EVPN next hop tracking to type-1 and type-4 routes
2021-09-16 14:52:45 -07:00
Jafar Al-Gharaibeh
7c3ea1c424
Merge pull request #9619 from AnuradhaKaruppiah/lttng-updates
lttng build updates
2021-09-16 14:55:43 -05:00
Donald Sharp
4367df1575 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>
2021-09-16 15:12:13 -04:00
Donatas Abraitis
68a8bd50d4
Merge pull request #9627 from donaldsharp/connect_interface_based_issue
bgpd: Allow v6 LL peers to work when connected to as well
2021-09-16 21:14:43 +03:00
Donald Sharp
7e469b9476
Merge pull request #9489 from opensourcerouting/pim-restruct-20210825
pimd: move IGMP memberships from socket to iface, + some cleanups
2021-09-16 12:32:45 -04:00
Renato Westphal
b275f44a4a 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>
2021-09-16 12:26:48 -03:00
Renato Westphal
b1c1004fb9 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>
2021-09-16 12:26:48 -03:00
Renato Westphal
7116509803 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>
2021-09-16 12:26:48 -03:00
Renato Westphal
1a898463a3 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>
2021-09-16 12:26:05 -03:00
Donald Sharp
f4291f383d *: 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>
2021-09-16 08:13:17 -04:00
Donald Sharp
dcd5ba5505 bgpd: Allow v6 LL peers to work when connected to as well
Initial commit: 8761cd6ddb

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>
2021-09-16 08:07:45 -04:00
Donatas Abraitis
a8f67b1306
Merge pull request #9614 from idryzhov/bgp-aspath-coverity
bgpd: fix coverity warning
2021-09-16 15:03:25 +03:00
Donatas Abraitis
0d0d9d929e
Merge pull request #9623 from donaldsharp/test_bgp_table
tests: Fix make check builds on some bsd variants
2021-09-16 09:03:12 +03:00
Donatas Abraitis
4899c2be99
Merge pull request #9622 from taspelund/arp_sysctl_formatting
doc: fixup formatting in zebra.rst
2021-09-16 08:56:13 +03:00
Donald Sharp
6aed8082b6 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>
2021-09-15 21:10:24 -04:00
Trey Aspelund
4c9cf1988f doc: fixup formatting in zebra.rst
Swap out incorrect usage of '^' with proper usage of '-'.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2021-09-15 20:50:55 -04:00
Donald Sharp
827ddd5a1d
Merge pull request #9596 from LabNConsulting/ziemba/printfrr-nexthop
printfrr %pNHcg, %pNHci
2021-09-15 20:23:30 -04:00
Donald Sharp
4c1098ec00
Merge pull request #9613 from aaronpereira88/evpn-rt1-legend
bgpd: Update route-type-1 legend to match output
2021-09-15 20:22:46 -04:00
Donald Sharp
381b0645ab
Merge pull request #9617 from idryzhov/ospf6-cleanup-om6
ospf6d: cleanup useless checks
2021-09-15 20:19:12 -04:00
Igor Ryzhov
ee522f5729 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>
2021-09-15 22:45:23 +03:00
Anuradha Karuppiah
c038cddff8 tests: include lttng libs in the bgp tests build
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2021-09-15 11:22:08 -07:00
Anuradha Karuppiah
1bea8eacb3 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>
2021-09-15 11:21:22 -07:00
Igor Ryzhov
175c92e67e ospf6d: cleanup useless checks
om6->ospf6 is always initialized at the start of the execution.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-09-15 19:21:47 +03:00
Stephen Worley
bc4477ecbd
Merge pull request #9608 from idryzhov/vtysh-segfault
lib: fix segfault on question mark on empty line
2021-09-15 11:43:37 -04:00
Mark Stapp
aae2caea77
Merge pull request #9615 from idryzhov/ospf6-null-deref
ospf6d: fix possible NULL dereference
2021-09-15 10:05:29 -04:00
Russ White
a79c6892bc
Merge pull request #9611 from donaldsharp/more_default_bull
when doing a switch over an enumeration do not use default
2021-09-15 09:06:49 -04:00
Aaron Pereira
0a5c5f135e bgpd: Update legend also for evpn_show_route_rd
Signed-off-by: Aaron Pereira <aaronpereira88@gmail.com>
2021-09-15 05:18:50 -07:00
Igor Ryzhov
390dce1275 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>
2021-09-15 13:48:29 +03:00
Igor Ryzhov
9120498487 bgpd: fix coverity warning
CID 1506874.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-09-15 13:21:21 +03:00
Donatas Abraitis
9948e5acb2
Merge pull request #9432 from taspelund/arp_sysctl_initial
vtysh/sysctl doc improvements
2021-09-15 10:31:40 +03:00
Igor Ryzhov
56fd31a532
Merge pull request #9393 from donaldsharp/extract_more_data 2021-09-15 01:26:13 +03:00
Christian Hopps
2e69e3852f
Merge pull request #9410 from idryzhov/static-show-run-nb
staticd: output config using NB callbacks instead of operational data
2021-09-14 16:45:28 -04:00
Trey Aspelund
229f842baa 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>
2021-09-14 16:44:03 -04:00
Trey Aspelund
bca2d9bc70 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>
2021-09-14 16:42:56 -04:00
Aaron Pereira
f13b2527cb 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>
2021-09-14 11:55:17 -07:00
Donald Sharp
321f8e0d84 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>
2021-09-14 13:28:00 -04:00
Donald Sharp
21ecdb1f34 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>
2021-09-14 13:27:19 -04:00
G. Paul Ziemba
016cfe701e lib,doc,tests: printfrr %pNHcg, %pNHci
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2021-09-14 10:06:57 -07:00
Donald Sharp
b504f65baf 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>
2021-09-14 12:56:58 -04:00
Sri Mohana Singamsetty
2a8ded2b97
Merge pull request #9381 from AnuradhaKaruppiah/evpn-mh-display
bgpd: remove es_path VNI display from type-2 routes
2021-09-14 09:39:13 -07:00
Anuradha Karuppiah
fa46a5cd45 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>
2021-09-14 09:07:59 -07:00
Igor Ryzhov
b8c01bba53
Merge pull request #9486 from slankdev/slankdev-srv6-no-cli-1
CLI to delete SRv6 locator
2021-09-14 19:04:03 +03:00
Mark Stapp
5fbbd15d1e
Merge pull request #9438 from ranjanyash54/debug_comm
ospf6d: Add debug commands for lsa all and route all
2021-09-14 11:38:21 -04:00