Commit Graph

26797 Commits

Author SHA1 Message Date
Renato Westphal
578e1c5331 ospf6d: remove unused function parameter
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-10-05 21:21:43 -03:00
Russ White
cf3a190ace
Merge pull request #9716 from rgirada/ospf_gr_nbr
ospfd: GR helper functionality change in helper exit
2021-10-05 19:28:40 -04:00
Russ White
334d9d259f
Merge pull request #9731 from ton31337/fix/thread_null_set
cleanup: struct thread = NULL
2021-10-05 19:27:23 -04:00
Russ White
6018f0424e
Merge pull request #9728 from donaldsharp/null_thread
Null thread
2021-10-05 19:26:00 -04:00
Russ White
a3232e63e6
Merge pull request #9733 from opensourcerouting/grpc-fix-missing
lib: fix gRPC crash on missing YANG node
2021-10-05 19:24:34 -04:00
ewlumpkin
214d8a60e1 lib: fix spelling nits in more lib files
Signed-off-by: ewlumpkin <ewlumpkin@gmail.com>
2021-10-05 21:42:57 +00:00
Jafar Al-Gharaibeh
f72b987de1
Merge pull request #9743 from pguibert6WIND/largecomm
bgpd: large community exact match fix
2021-10-05 14:30:45 -05:00
Jafar Al-Gharaibeh
aefe11f77a
Merge pull request #9711 from idryzhov/doc-ospf
doc: fix ospf distribute-list command and description
2021-10-05 14:25:42 -05:00
Jafar Al-Gharaibeh
1365d3e2f5
Merge pull request #9744 from idryzhov/isis-redist-cli
isisd: fix redistribute CLI
2021-10-05 14:22:27 -05:00
Jafar Al-Gharaibeh
e91c3433bf
Merge pull request #9725 from idryzhov/doc-debug-ospf
doc: fix debugging-ospf label
2021-10-05 11:52:32 -05:00
Jafar Al-Gharaibeh
c3b9332476
Merge pull request #9736 from ewlumpkin/comment_spelling_fixes
lib: fix spelling nits in command.h
2021-10-05 11:48:20 -05:00
Rafael Zalamena
2d28cbe661 topotests: justify code sleep
Document the `sleep` statement so people know that we are sleeping
because we are waiting for the BFD down notification. If we don't
sleep here it is possible that we get outdated `show` command results.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-10-05 12:41:33 -03:00
Rafael Zalamena
8ff24fd29e topotests: decrease result check frequency
Call the `show` commands less often to reduce the CPU pressure.

Also increase the wait time from 60 to 80 seconds to have spare room
for failures (4 times more). This is the latest measure wait time:

> INFO: topolog: 'router_json_cmp' succeeded after 20.08 seconds

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-10-05 12:40:14 -03:00
Rafael Zalamena
a6ce07852c topotests: increase OSPF convergence speed
Reduce timers so we send hello packets more often and reduce dead
interval to converge faster.

Previous test wait amount:
> INFO: topolog: 'router_json_cmp' succeeded after 47.20 seconds

New test wait amount:
> INFO: topolog: 'router_json_cmp' succeeded after 20.08 seconds

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-10-05 12:38:40 -03:00
Igor Ryzhov
1bfee9368a isisd: fix redistribute CLI
Currently, it is possible to configure IPv6 protocols for IPv4
redistribution and vice versa in CLI. The YANG model doesn't allow this
so the user receives the following error:
```
nfware(config-router)# redistribute ipv4 ospf6 level-1
% Failed to edit configuration.

YANG error(s):
 Invalid enumeration value "ospf6".
 Invalid enumeration value "ospf6".
 Invalid enumeration value "ospf6".
 YANG path: Schema location /frr-isisd:isis/instance/redistribute/ipv4/protocol.
```

Let's make CLI more user-friendly and allow only supported protocols in
redistribution commands.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-05 17:38:21 +03:00
Philippe Guibert
0d5b3cb9d7 bgpd: large community exact match fix
The pointer to large community was not the appropriate one.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2021-10-05 16:24:41 +02:00
Rafael Zalamena
0f538858c2 lib: prevent gRPC assert on missing YANG node
`yang_dnode_get` will `assert` if no YANG node/model exist, so lets test for
its existence first before trying to access it.

This `assert` is only acceptable for internal FRR usage otherwise we
might miss typos or unmatching YANG models nodes/leaves. For gRPC usage
we should let users attempt to use non existing models without
`assert`ing.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-10-05 10:22:27 -03:00
rgirada
a60eab9e10 ospf6d: ospf6d is crashing upon receiving duplicated Grace LSA.
Description:
	When grace lsa received, DUT is adding
	the copy of the  lsas  to all nbrs retransmission  list as part of
	flooding procedure and subsequently incrementing the rmt counter in
	the original the LSA. This counter is supposed to be decremented
	when ack is received by nbr and the lsa  will be removed from retransmission list.

	But in our current scenario,
	Step-1:
		When GR helper is disabled, if DUT receives the grace lsa
		it adds the lsa copy to nbrs retransmission list but original
		LSA will be discarded since GR helper disabled.
	Step-2:
		GR helper enabled and DUT receives the grace lsa, as part
		of flooding process all nbrs have same copy of lsa in their
		corresponding rmt list which was added in step -1 due to this
		the corresponding rmt counter in the original lsa is not getting
		incremented.
	Step-3:
		If the same copy of the grace lsa received by DUT, It considers
		as implicit ack from nbr if the same copy of the lsa exits in its
		rmt list and subsequently  decrement the rmt counter.
	Since counter is zero (because of step-1 and 2) , it is asserting while decrement.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2021-10-05 04:14:37 -07:00
Igor Ryzhov
405ebe45cf yang: replace an empty pattern with a zero-length restriction
No functional difference, but `length "0"` is more comprehensible.

Suggested-by: Christian Hopps <chopps@labn.net>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-05 14:03:37 +03:00
ewlumpkin
81eb8fc749 lib: fix spelling nits in command.h
Signed-off-by: ewlumpkin <ewlumpkin@gmail.com>
2021-10-05 03:21:50 +00:00
Donald Sharp
9bfadae860 zebra: Use a bool for startup indications
Let's not pass around an int startup when all we are doing
is true/falsing it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-04 20:26:38 -04:00
Renato Westphal
5b9414484c
Merge pull request #9726 from donaldsharp/ospf6_expire
ospf6d: Ensure expire thread is properly stopped
2021-10-04 21:13:50 -03:00
Donald Sharp
0cf0069d31 zebra: On interface startup note that we are in startup
The boolean to notice that we are in startup situations
was not being properly set in one spot.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-04 16:00:27 -04:00
Sri Mohana Singamsetty
fd7abfa80b
Merge pull request #9722 from chiragshah6/zdev
zebra: add nhg id to show ip route json
2021-10-04 10:07:00 -07:00
Javier Garcia
5d5e0f5209 doc: Augmented pathd documentation.
Extend the pathd documentation with more configuration examples, more
detailed and some graphics to help understand what pathd supports.

Signed-off-by: Javier Garcia <rampxxxx@gmail.com>
2021-10-04 18:56:47 +02:00
Donatas Abraitis
83e66fdfd6 tools: Add coccinelle script to catch thread to NULL assignments
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-04 19:29:06 +03:00
Donatas Abraitis
62143398ce watchfrr: Do not explicitly set the thread pointer to NULL
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-04 19:29:06 +03:00
Donatas Abraitis
feabd51dae tests: Do not explicitly set the thread pointer to NULL
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-04 19:29:06 +03:00
Donatas Abraitis
bf5335cf34 pimd: Do not explicitly set the thread pointer to NULL
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-04 19:29:06 +03:00
Donatas Abraitis
f2b64253b8 ospf6d: Do not explicitly set the thread pointer to NULL
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-04 19:29:06 +03:00
Donatas Abraitis
56fb213493 nhrpd: Do not explicitly set the thread pointer to NULL
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-04 19:29:06 +03:00
Donatas Abraitis
dc4a902689 ldpd: Do not explicitly set the thread pointer to NULL
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-04 19:25:18 +03:00
Donatas Abraitis
c34d552dd5 isisd: Do not explicitly set the thread pointer to NULL
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-04 19:24:54 +03:00
Donatas Abraitis
876968a610 bfdd: Do not explicitly set the thread pointer to NULL
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-04 19:24:28 +03:00
Donatas Abraitis
510404d9f3 zebra: Do not explicitly set the thread pointer to NULL
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-04 19:23:55 +03:00
Donald Sharp
fc3f4adbc6 ospf6d: Ensure expire thread is properly stopped
The lsa->expire thread is for keeping track of when we
are expecting to expire(remove/delete) a lsa.  There
are situations where we just decide to straight up
delete the lsa, but we are not ensuring that the
lsa is not already setup for expiration.
In that case just stop the expiry thread and
do the deletion.

Additionally there was a case where ospf6d was
just dropping the fact that a thread was already
scheduled for expiration.  In that case we
should just setup the timer again and it will
reset it appropriately.

Fixes: #9721
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-04 12:13:57 -04:00
Donatas Abraitis
a33842f08d bgpd: Don't set NULL for struct thread at bgp_dump_interval_func()
NULL is already handled by thread_fetch().

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-04 19:07:41 +03:00
Donatas Abraitis
a3e036f36a
Merge pull request #9689 from AnuradhaKaruppiah/bgp-evpn-lttng
bgpd: initial batch of evpn lttng tracepoints
2021-10-04 19:05:41 +03:00
Donald Sharp
eb946ef505 eigrpd: Ensure better struct thread * semantics
1) Do not explicitly set the thread pointer to NULL.
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

2) Fix mixup of `struct eigrp_interface` and `struct eigrp`
usage of the same thread pointer.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-04 09:47:29 -04:00
Donald Sharp
64da2e8ecd ripd: Ensure better struct thread * semantics
Do not explicitly set the thread pointer to NULL.
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-04 09:36:54 -04:00
Donald Sharp
c733548963 ripngd: Ensure better struct thread * semantics
1) Remove `struct thread *` pointers that are never used
2) Do not explicitly set the thread pointer to NULL.
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-04 09:28:36 -04:00
Igor Ryzhov
651151f0be isisd: remove unused function declaration
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-04 15:23:46 +03:00
Igor Ryzhov
cb00030f9a doc: fix debugging-ospf label
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-04 15:22:24 +03:00
Donald Sharp
f3d20a2aa5 bgpd: When removing v6 address being used as a nexthop ensure peer is reset
With v6 interface based peering, we send the global as well as the LL address
as nexthops to the peer.  When either of these were removed on the interface
we were not necessarily resetting the connection.  Leaving bgp in a state
where the peer had reachability for addresses that are no longer in use.

Modify the code that when we receive an interface address deletion
event.  Check to see that we are using the v6 address as nexthops
for that peer and if so, tell it to reset.

I initially struggled with a hard reset of the peer or a clear but
choose to follow other places in the code that we noticed address
changes that resulted in hard resets.

Ticket: #2799568
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-04 08:03:38 -04:00
Donald Sharp
e1a32ec1c5 bgpd: bgp_announce_route should know if we should force the update or not
When calling bgp_announce_route allow it to properly set the flag
to force an update to go out or not.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-04 07:59:18 -04:00
Mobashshera Rasool
de4e7e3355 pimd: pimd: hello sent counters are getting clear on new neighbor addition
Problem Statement:
==================
On new neighbor addition, the tx counter for hello msg is reset.

Fix:
=================
Do not reset the tx counter on new neighbor addition.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-10-03 22:04:34 -07:00
Mobashshera Rasool
79992e8a42 pimd: Add a flag to decide PIM has to send Hello
Problem Statement:
==================
pim maintains two counters hello tx and hello rx at interface level.
At present pim needs to send the hello message prior to other pim
message as per RFC. This logic is getting derived from the tx hello
counters. So when a new neighbor is added, tx counters are set to
zero and then based on this, it is further decided to send hello in
pim_hello_require function.

Fix:
====
Separating the hello statistics and the logic to decide when to send hello
based on a new flag. pim_ifstat_hello_sent will be used to note down
the hello stats while a new flag is added to decide whether to send hello
or not if it is the first packet to a neighbor.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-10-03 22:04:34 -07:00
Chirag Shah
1b3ac4c7ca zebra: add nhg id to show ip route json
Add json field nexthop group id to
'show ip route json'.

Testing Done:
{
  "27.0.0.14\/32":[
    {
      "prefix":"27.0.0.14\/32",
      "protocol":"bgp",
      "selected":true,
      "destSelected":true,
      "distance":20,
      "metric":0,
      "installed":true,
      "table":254,
      "internalStatus":16,
      "internalFlags":8,
      "internalNextHopNum":2,
      "internalNextHopActiveNum":2,
      "nexthopGroupId":103,     <---- New field
      "uptime":"00:04:37",
      "nexthops":[
        {
          "ip":"fe80::202:ff:fe00:11",
          "interfaceName":"uplink-1",
        },
        {
          "ip":"fe80::202:ff:fe00:1d",
          "interfaceName":"uplink-2",
        }
      ]
    }
  ]
}

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-10-03 16:20:46 -07:00
Donatas Abraitis
31df775552
Merge pull request #9714 from idryzhov/bgp-ext-comm-doc
doc: fix range for bgp expanded community list
2021-10-02 20:14:11 +03:00
Donatas Abraitis
b1fb03f8b1
Merge pull request #9710 from idryzhov/bgp-distribute-list-update
bgpd: fix access-list update callback
2021-10-02 20:12:47 +03:00