Commit Graph

33714 Commits

Author SHA1 Message Date
Donatas Abraitis
89e6b4f390 bgpd: Send software version capability for OAD EBGP peers
We send this capability for iBGP peers by default. Recently OAD support was
merged, and we should adopt sending the capability according to OAD as well.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-11-08 15:29:32 +02:00
Donatas Abraitis
6af683039f bgpd: Set the software version capability received flag only after a validation
We shouldn't set it blindly once the packet is received, but first we have to
do some sanity checks.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-11-08 15:26:40 +02:00
Donatas Abraitis
f6d708bc80
Merge pull request #14741 from donaldsharp/zebra_h_cleanup
Zebra h cleanup
2023-11-08 09:03:00 +01:00
Donatas Abraitis
4d9e220f1d
Merge pull request #14746 from LabNConsulting/valgrind-leak-kinds
tests: add ability to show all types of valgrind memleaks
2023-11-08 09:01:02 +01:00
Christian Hopps
c27b054efe tests: add ability to show all types of valgrind memleaks
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-11-07 15:29:37 -05:00
Russ White
cf51579b5b
Merge pull request #14698 from opensourcerouting/fix/remove_static_arp_entries_on_ifdown_events
zebra: Remove static ARP entries on interface down events
2023-11-07 09:40:01 -05:00
Donald Sharp
6de9f7fbf5 *: Move distance related defines into their own header
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-07 06:47:51 -05:00
Donald Sharp
42ddcf71e5 *: Remove APPLE #defines from build
We cannot build on apple machines at all due
to our usage of some gcc extensions that will
probably never see the light of day again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-07 06:46:19 -05:00
Donald Sharp
315aa6cde4 *: Remove netlink headers from lib/zebra.h
The headers associated with netlink code
really only belong in those that need it.
Move these headers out of lib/zebra.h and
into more appropriate places.  bgp's usage
of the RT_TABLE_XXX defines are probably not
appropriate and will be cleaned up in future
commits.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-07 06:46:19 -05:00
Donatas Abraitis
f57763eaed
Merge pull request #14729 from donaldsharp/v6_rr_semantics_zrouter
V6 rr semantics zrouter
2023-11-06 23:00:50 +02:00
Mark Stapp
d67c60eda3
Merge pull request #14742 from FRRouting/revert-14648-import_no_no_no
Revert "bgpd: combine import_check_table and nexthop_check_table"
2023-11-06 10:38:06 -05:00
Donald Sharp
c2cedabed1
Revert "bgpd: combine import_check_table and nexthop_check_table" 2023-11-06 10:07:58 -05:00
Donald Sharp
7e1b56ba98 zebra: When using Nexthop groups, use v6 RR semantics
The nexthop group route replace operation was made consistent
across all versions of the kernel.  A v6 route replacement
does not need to do a delete than add when using nexthop
groups

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-06 08:56:50 -05:00
Donald Sharp
7fe9333dd7 zebra: Move v6_rr_semantics to be part of zrouter structure
Move global variable v6_rr_semantics from a global data structure
into the zrouter data structure.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-06 08:42:30 -05:00
Donald Sharp
4e996e98ec zebra: Add v6_rr_semantics status to show zebra
The v6_rr_semantics variable was being set but never
reported and had to be inferred from watching netlink
messages to the kernel.  Let's add a bit of code
to `show zebra` so that we can know how it is being
used.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-06 08:12:04 -05:00
Donald Sharp
5752340415
Merge pull request #14730 from opensourcerouting/fix/doc_releases
doc: Add a quick example on how to use release_notes.py
2023-11-06 08:11:03 -05:00
Donald Sharp
8b9378dccf
Merge pull request #14734 from opensourcerouting/fix/add_missing_documentation_for_community_any
doc: Add missing match community exact-match/any
2023-11-06 08:10:45 -05:00
Donald Sharp
b66dc0909e
Merge pull request #14736 from opensourcerouting/transparent-sockunion
lib: create a transparent union `sockunion`
2023-11-06 08:09:48 -05:00
Donatas Abraitis
a35bb7e2a8 zebra: Remove static ARP entries on interface down events
Without this patch, static ARP entries remain active even if the interface is
down, but the kernel already removed them.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-11-06 15:00:59 +02:00
Igor Ryzhov
23ebea36cb
Merge pull request #14726 from cscarpitta/fix/fix-openfabric-crash
isisd: Fix crash when enabling OpenFabric on an interface
2023-11-05 23:39:14 +02:00
David Lamparter
bf098b4a11 lib: add a transparent union for sockaddrs
As with "prefixptr"/"prefixconstptr", this allows function prototypes to
say "just give me any sockaddr" typing-wise, without having the compiler
complain that a "struct sockaddr_in" is not a "struct sockaddr".

(Split off from other changes that start using this.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-11-05 18:19:52 +01:00
David Lamparter
19cbc31579 lib: rename prefixtype to uniontype
About to use this for sockunion, which is not a prefix.  `uniontype`
makes more sense, the macros are for defining transparent unions after
all.

(clang-format off thrown in as it otherwise wrecks formatting.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-11-05 18:19:09 +01:00
Donatas Abraitis
19ac7818ba doc: Add missing match community exact-match/any
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-11-05 08:31:05 +02:00
Donatas Abraitis
b0317265b1 doc: Add a quick example on how to use release_notes.py
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-11-04 16:32:01 +02:00
Donatas Abraitis
4bdba57861
Merge pull request #14724 from donaldsharp/workqueue_cleanup
Workqueue cleanup
2023-11-04 13:58:55 +02:00
Donald Sharp
d4c596d77f
Merge pull request #14728 from FRIDM636/rework_debug_pathd_pcep
pathd: rework debug pathd pcep command
2023-11-03 18:08:17 -04:00
Donald Sharp
4f321489cf
Merge pull request #14723 from opensourcerouting/if_zapi_hooks_convert
lib: convert `if_zapi_callbacks` into actual hooks
2023-11-03 16:36:17 -04:00
Donald Sharp
2a65f05d77 lib: Remove unused WQ_RETRY_XXX enums
These enum's have been around since 2005 and FRR
still does not have any users of these particular
values.  After almost 20 years, let's simplify the
code slightly and remove them.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-03 18:06:01 +00:00
Donald Sharp
b14f755408 lib: Cleanup some header files in lib
buffer.h  -> Bring up to our standard
if.h -> Bring up to our standard
workqueue.h -> expand documentation slightly

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-03 18:05:59 +00:00
Donald Sharp
a553bd6d68 lib: Move workqueue private functions into workqueue.c
Some Functions are not used outside of workqueue.c.
Move them inside of workqueue.c to limit scope.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-03 17:54:55 +00:00
Donald Sharp
a22ab3f98f zebra: Fix missing break in switch
Recent Changes added the -Wimplicit-fallthrough flag
to FRR's compilation.  Implementor does not build with
lua support and as such this one was missed in the compilation

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-11-03 17:54:55 +00:00
Farid Mihoub
a9ba982472 pathd: rework debug pathd pcep command
Rework "debug pathd pcep [...]" command to support the following
configurations:
  - configure one debugging log type at a time.
  - deconfigure one debugging log type at a time.
  - configure all debugging logs in one shot.
  - deconfigure all debugging logs in one shot.

Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
2023-11-03 17:09:11 +01:00
Carmine Scarpitta
ccd82b3471 isisd: Fix style warnings reported by CI
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2023-11-03 13:20:29 +01:00
Carmine Scarpitta
7e5f1a0bb4 isisd: Fix openfabric crash
`isis_srv6_area_init` should not use `yang_get_default_*` functions for
fabricd.

Fixes: https://github.com/FRRouting/frr/issues/14722

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2023-11-03 13:19:24 +01:00
David Lamparter
d889055d8e lib: convert if_zapi_callbacks into actual hooks
...so that multiple functions can be subscribed.

The create/destroy hooks are renamed to real/unreal because that's what
they *actually* signal.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-11-02 17:10:43 -07:00
Donald Sharp
ad44b541ef
Merge pull request #14717 from opensourcerouting/fix/coverity_issues
A couple coverity issues
2023-11-02 19:26:05 -04:00
Donald Sharp
c772c52e62
Merge pull request #14716 from opensourcerouting/fix/eor_should_be_withdraw
bgpd: A couple more bgpd crash fixes for malformed packets
2023-11-02 11:19:00 -04:00
Donald Sharp
a39c53637f
Merge pull request #14720 from opensourcerouting/fix/apply_black_formatting_frr-reload
tools: Apply black formatting for tools/frr-reload.py
2023-11-02 09:50:25 -04:00
Donatas Abraitis
885613e45d tools: Apply black formatting for tools/frr-reload.py
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-11-02 13:39:53 +02:00
Donatas Abraitis
94bb396811
Merge pull request #14713 from chiragshah6/mdev1
tools: fix frr-reload route-map desc cmd
2023-11-02 13:38:23 +02:00
Donatas Abraitis
42045aac7b bgpd: Fix UNINTENDED_INTEGER_DIVISION for bgp_lp_event_zebra_up()
CID 1570864.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-11-02 13:25:43 +02:00
Donatas Abraitis
081d1a4cd0
Merge pull request #14707 from donaldsharp/nocache
pimd: Ensure upstream points at the correct rpf
2023-11-02 12:42:22 +02:00
Chirag Shah
989991cf3c tools: fix frr-reload route-map desc cmd
Fix frr-reload script to only render 'no description'
rather than 'no description blah'

Ticket:#3650752
Testing:

route-map TEST permit 140
 description rule for PFIX_IPV6_7
 match ipv6 address prefix-list PFIX_IPV6_7
exit
!
end

torc-11# confi t
torc-11(config)# route-map TEST permit 140
torc-11(config-route-map)# no description rule for PFIX_IPV6_7
% Unknown command: no description rule for PFIX_IPV6_7

torc-11(config-route-map)# no description rule
% There is no matched command.
torc-11(config-route-map)# no description
  <cr>
torc-11(config-route-map)# no description
torc-11(config-route-map)#

Using frr-reload failure log:
2023-10-31 00:30:31,972  INFO: Failed to execute route-map TEST permit 140  no description rule for PFIX_IPV6_7 exit
2023-10-31 00:30:31,972 ERROR: "route-map TEST permit 140 --  no description rule for PFIX_IPV6_7 -- exit" we failed to remove this command
2023-10-31 00:30:31,972 ERROR: % Unknown command:  no description rule for PFIX_IPV6_7

With fix:

2023-11-02 06:10:30,024  INFO: Executed "route-map TEST permit 140  no description exit"

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2023-11-01 23:06:07 -07:00
Donatas Abraitis
298975b574 zebra: Remove vrf_id check against VRF_DEFAULT for zebra_redistribute()
A dead code. When `is_table_direct` is true, vrf_id is always VRF_DEFAULT.

So this block is never called.

CID 1570863.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-11-01 10:23:49 +02:00
Donald Sharp
8e3a96e846
Merge pull request #14546 from adrianomarto/ospf6-point-to-multipoint
OSPF6 point to multipoint
2023-10-31 18:20:04 -04:00
Donald Sharp
33025d97b2 pimd: Ensure upstream points at the correct rpf
In the scenario on an intermediate router where a *,G join has
been received and a S,G stream is being sent through that router
on the *,G stream, there exists a situation when the *,G in has been pruned
but the stream is still being received on on incoming interface towards
the RP for the *,G.   In this situation PIM will see the S,G stream
initially as a NOCACHE from the dataplane, PIM will then do a RPF
for the S and notice that it is supposed to be coming in on adifferent
interface.  In this case PIM the original PIM code would create
a blackhole mroute towards the RPF of the *,G( the interface the
stream is being received on ).  The original reason for this is that
if there is a scenario where this particular S1,G stream is sending
at basically line rate, and there also happens to be a different
S2,G stream that is sending at a very low rate.  With certain
dataplanes there is no way to really rate limit the S1 -vs- S2
stream and the S1 stream completely overwhelms the S2 stream
for sending up to the control plane for proper pim handling.
The problem then becomes that FRR never properly responds
to the situation where the *,G is rereceived and the S,G
stream switches back over to the SPT for itself and FRR ends
up with a dead mroute that stops everything from working properly.

This code change, installs the blackhole mroute with the RPF
towards the RP for the G and then resets the RPF to the correct
RPF for the Stream but does not modify the mroute.  When the
*,G is rereceived and we attempt to transition to the S,G stream
this now works.

As a note:  Both David L and myself do not necessarily believe
we fully understand the problem yet.  What this does do is fix
all the inconsistent CI issues we are seeing in the topotests
at this time.  Internally I am seeing other test failures
in PIM that I don't fully understand and we suspect that
there are other problems in the state machine.  We plan to
revisit this problem as we are able to debug the issue better.
In the meantime both David and Myself agree that this gets
the CI working again and Streams end up in the right state.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-10-31 13:25:32 -04:00
Russ White
644386fe48
Merge pull request #14388 from pguibert6WIND/redistribute_table_bgp_2
Redistribute table bgp without copying data to the default routing table
2023-10-31 13:23:57 -04:00
Donald Sharp
dbe2f6ca7c
Merge pull request #14699 from FRIDM636/no_commands_pcep_msd
Add missing pcep no commands
2023-10-31 12:04:21 -04:00
Donald Sharp
30a51411a2
Merge pull request #14700 from mjstapp/fix_devdoc_bits
docs: clean up some developer doc warnings
2023-10-31 12:01:53 -04:00
Donatas Abraitis
c37119df45 bgpd: Ignore handling NLRIs if we received MP_UNREACH_NLRI
If we receive MP_UNREACH_NLRI, we should stop handling remaining NLRIs if
no mandatory path attributes received.

In other words, if MP_UNREACH_NLRI received, the remaining NLRIs should be handled
as a new data, but without mandatory attributes, it's a malformed packet.

In normal case, this MUST not happen at all, but to avoid crashing bgpd, we MUST
handle that.

Reported-by: Iggy Frankovic <iggyfran@amazon.com>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-10-31 17:22:00 +02:00