bgpd,zebra: EVPNv6 addressing coverity warnings - #20680
Merged
Merged
Conversation
Greptile OverviewGreptile SummaryThis PR addresses Coverity static analysis warnings (UNINIT, UNINIT_VAR, MISSING_INITIALIZATION, NULL_RETURNS) in the EVPNv6 codebase. The changes focus on proper initialization and error handling:
All changes are defensive programming improvements that make the code more robust without altering functional behavior. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Zebra as Zebra Process
participant Stream as Stream Buffer
participant BGP as BGP Process
participant EVPN as EVPN Subsystem
Note over Zebra,BGP: L3VNI/VNI Add Flow
Zebra->>Stream: Write L3VNI/VNI data
Stream->>BGP: ZEBRA_L3VNI_ADD/ZEBRA_VNI_ADD callback
BGP->>Stream: stream_get_ipaddr(s, &originator_ip)
alt Stream read successful
Stream-->>BGP: return true
BGP->>BGP: Initialize vtep_ip with IPADDR_NONE
BGP->>EVPN: Process L3VNI/VNI with valid IP
EVPN-->>BGP: Success
else Stream read failed
Stream-->>BGP: return false
BGP->>BGP: Log error message
BGP-->>Zebra: return 0 (error)
end
Note over Zebra,EVPN: MAC/Neighbor Processing
Zebra->>EVPN: Add/Update local MAC
EVPN->>EVPN: Initialize vtep_ip = {.ipa_type = IPADDR_NONE}
EVPN->>EVPN: Process MAC with initialized structure
Zebra->>EVPN: Update local neighbor
EVPN->>EVPN: Initialize vtep_ip = {.ipa_type = IPADDR_NONE}
EVPN->>EVPN: Process neighbor with initialized structure
|
ton31337
reviewed
Feb 4, 2026
Fixed coverity warnings in evpnv6 code UNINIT UNINIT_VAR MISSING_INITIALIZATION Ticket: #4782248 Signed-off-by: Manpreet Kaur <manpreetk@nvidia.com>
Manpreet-k0
force-pushed
the
evpnv6_coverity_fix
branch
from
February 4, 2026 09:17
e47fef4 to
4b3934b
Compare
Contributor
Author
|
ci:rerun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed coverity warnings in evpnv6 code
UNINIT
UNINIT_VAR
MISSING_INITIALIZATION
NULL_RETURNS