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
zebra: fix FreeBSD breakage #3582
zebra: fix FreeBSD breakage #3582
Conversation
When porting routing socket macro data handling to functions, the attribute function was forgotten. The only difference between the attribute and address handler is the family type check. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Handle corner case where a warning log message is issued on interface address netmask handling with sockaddr type AF_LINK: it may come empty or with match all (all 0xFF). In the first case all lengths are zero and we only need to copy the first bytes, second case it comes with a zero index and all 0xFF bytes. In any case we only need to figure out a few of the first bytes instead of all data. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
When an empty netmask a wrong end size is calculated, lets handle this corner case to avoid spurious warning messages. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an EXPERIMENTAL automated CI system. Get source and apply patch from patchwork: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedIPv4 ldp protocol on Ubuntu 16.04: Successful Topology tests on Ubuntu 16.04 amd64: FailedTopology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-6345/test Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6345/artifact/TOPOU1604/ErrorLog/log_topotests.txt Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6345/artifact/TOPOU1604/MemoryLeaks/Warnings Generated during build:Checkout code: Successful with additional warnings:Topology tests on Ubuntu 16.04 amd64: FailedTopology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOU1604-6345/test Topology Tests failed for Topology tests on Ubuntu 16.04 amd64:
see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6345/artifact/TOPOU1604/ErrorLog/log_topotests.txt
Warnings Generated during build:Ubuntu 16.04 i386 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 i386 build:
Debian 9 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 9 amd64 build:
Ubuntu 16.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 amd64 build:
Ubuntu 18.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 18.04 amd64 build:
Ubuntu 14.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 14.04 amd64 build:
Debian 8 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 8 amd64 build:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base |
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-6345/ This is a comment from an EXPERIMENTAL automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings:
Warnings Generated during build:Ubuntu 16.04 i386 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 i386 build:
Debian 9 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 9 amd64 build:
Ubuntu 16.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 16.04 amd64 build:
Ubuntu 18.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 18.04 amd64 build:
Ubuntu 14.04 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu 14.04 amd64 build:
Debian 8 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian 8 amd64 build:
CLANG Static Analyzer Summary
No Changes in Static Analysis warnings compared to base |
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.
Nice tracking this down - I had a small question about the naming of the helper function?
@@ -245,9 +247,10 @@ static inline int af_check(int family) | |||
return 0; | |||
} | |||
|
|||
size_t rta_get(caddr_t sap, void *destp, size_t destlen) | |||
size_t _rta_get(caddr_t sap, void *destp, size_t destlen, bool checkaf) |
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.
Could this be 'static', since it's an internal/utility function? Also, I don't love the little leading underscore name - could the name be a bit clearer, like 'rta_get_helper' or 'rta_get_internal' ?
Summary
@mwinter-osr found issues when running ANVL with FreeBSD related with some changes made to the routing socket handling. The issue only seems to happen on boot or when reconfiguring interfaces from scratch.
I've implemented an alternate
rta_getattr
function to imitateRTA_GETATTR
macro to keep the old behavior and fixed a corner case caused by acceptingAF_LINK
inNETMASK
onifam_read_mesg
. Please read the commit messages for more information.Related Issue
#3538
Components
zebra