-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverity Cleanup of Stuff #1044
Conversation
1) Handle key value not found on interface 2) Handle various NULL pointer possibilities 3) Fix possible integer overflow 4) Fix memory leak 5) Check return codes on sscanf Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
1) Error check return from setsockopt and sockets 2) Check return codes for str2prefix 3) Clean up some potential NULL References Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
💚 Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact @louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-1511/ This is a comment from an EXPERIMENTAL automated CI system. CLANG Static Analyzer Summary
Fixed warnings:
New warnings:
Static Analysis warning summary compared to base:
77 Static Analyzer issues remaining.See details at |
Add the RMAP_COMPILE_SUCCESS and switch over to using it. Refactoring allows a removal of a if statement to just use the switch statement already in place. Additionally the reworking cleans up memory freeing in a couple of spots. In one spot we no longer will leak memory too. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
0769ecd
to
9032c4e
Compare
💚 Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact @louberger |
/* labeled-unicast routes live in the unicast table */ | ||
if (safi == SAFI_LABELED_UNICAST) | ||
safi = SAFI_UNICAST; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right? I thought the change was made to store both in same table. Please confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look at the top of that function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looking at diffs just isn't enough sometimes ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see inline comments
zebra/zebra_rib.c
Outdated
if (!CHECK_FLAG(re->status, | ||
ROUTE_ENTRY_SELECTED_FIB)) | ||
continue; | ||
assert(table); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why assert vs just return? No need for this api change., i.e., requiring a test before the call. Think this assert should be removed.
zebra/zebra_vxlan.c
Outdated
@@ -1362,7 +1362,7 @@ static int zvni_gw_macip_add(struct interface *ifp, zebra_vni_t *zvni, | |||
zlog_debug( | |||
"%u:SVI %s(%u) VNI %u, sending GW MAC %s IP %s add to BGP", | |||
ifp->vrf_id, ifp->name, ifp->ifindex, zvni->vni, | |||
prefix_mac2str(macaddr, NULL, ETHER_ADDR_STRLEN), | |||
prefix_mac2str(macaddr, buf, ETHER_ADDR_STRLEN), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thi should be consistent with line 1347, i.e. either ETHER_ADDR_STRLEN or sizeof(buf) in both places.
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-1512/ This is a comment from an EXPERIMENTAL automated CI system. CLANG Static Analyzer Summary
Fixed warnings:
Static Analysis warning summary compared to base:
75 Static Analyzer issues remaining.See details at |
1) Various socket close issues 2) Ensure afi passed is usable 3) Fix some reads beyond buffer and reads after free 4) Ensure some failure modes are handled properly 5) Memory Leak(s) fix 6) There is no 6. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9032c4e
to
1e9f448
Compare
💚 Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact @louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-1513/ This is a comment from an EXPERIMENTAL automated CI system. CLANG Static Analyzer Summary
Fixed warnings:
Static Analysis warning summary compared to base:
75 Static Analyzer issues remaining.See details at |
The changes introduced in PR FRRouting#1044 caused pim to notice when a setsockopt call failed. The kicker here is that this used to just work because we ignored the issue pre. So VRF's need to BINDTODEVICE to get igmp callbacks but the default vrf does not need to do so. With the fix we now see IGMP group join: root@dell-s6000-02 ~/frr# vtysh -c "show ip igmp group" Interface Address Group Mode Timer Srcs V Uptime br1 20.0.11.1 232.2.3.4 EXCL 00:04:14 1 3 00:00:05 Fixes: FRRouting#1121 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Coverity Cleanup of Stuff
The changes introduced in PR FRRouting#1044 caused pim to notice when a setsockopt call failed. The kicker here is that this used to just work because we ignored the issue pre. So VRF's need to BINDTODEVICE to get igmp callbacks but the default vrf does not need to do so. With the fix we now see IGMP group join: root@dell-s6000-02 ~/frr# vtysh -c "show ip igmp group" Interface Address Group Mode Timer Srcs V Uptime br1 20.0.11.1 232.2.3.4 EXCL 00:04:14 1 3 00:00:05 Fixes: FRRouting#1121 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
No description provided.