-
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
lib/if: fix interface name comparison #11146
Conversation
Here are some tests to compare the result of the functions $ ./sandbox It seems this function was implemented to classify names like 'foo2' before 'foo10'. Not sure why this is needed. |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests debian 10 amd64 part 9: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO9DEB10AMD64-5206/test Topology Tests failed for Topotests debian 10 amd64 part 9 Successful on other platforms/tests
Warnings Generated during build:Checkout code: Successful with additional warningsTopotests debian 10 amd64 part 9: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO9DEB10AMD64-5206/test Topology Tests failed for Topotests debian 10 amd64 part 9
|
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedCentOS 7 rpm pkg check: Failed (click for details)CentOS 7 rpm pkg check: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-5207/artifact/CENTOS7RPM/ErrorLog/log_package_start.txt CentOS 7 rpm pkg check: No useful log foundTopotests Ubuntu 18.04 amd64 part 9: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO9U18AMD64-5207/test Topology Tests failed for Topotests Ubuntu 18.04 amd64 part 9 Successful on other platforms/tests
|
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.
Two comments, otherwise looks reasonable.
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.
LGTM
@NicolasDichtel : you should add to FRRouting tests your sandbox testing in order to avoid another regression for the next 19y ;) |
Yes, this is probably the oldest bug I've ever spotted :) |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedOpenBSD 7 amd64 build: Failed (click for details)Make failed for OpenBSD 7 amd64 build:
OpenBSD 7 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-PULLREQ2-5282/artifact/CI011BUILD/config.status/config.status FreeBSD 11 amd64 build: Failed (click for details)Make failed for FreeBSD 11 amd64 build:
FreeBSD 11 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-PULLREQ2-5282/artifact/CI009BUILD/config.status/config.status NetBSD 9 amd64 build: Failed (click for details)NetBSD 9 amd64 build: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-5282/artifact/CI012BUILD/config.log/config.log.gzMake failed for NetBSD 9 amd64 build:
NetBSD 9 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-PULLREQ2-5282/artifact/CI012BUILD/config.status/config.status FreeBSD 12 amd64 build: Failed (click for details)Make failed for FreeBSD 12 amd64 build:
FreeBSD 12 amd64 build: config.status output from configure script can be found at https://ci1.netdef.org/browse/FRR-PULLREQ2-5282/artifact/FBSD12AMD64/config.status/config.status Successful on other platforms/tests
|
Philippe has proposed another version: #11213 |
Using strtol() to compare two strings is a bad idea. Before the patch, if_cmp_name_func() may confuse foo001 and foo1. PR=79407 Fixes: 106d2fd ("2003-08-01 Cougar <[email protected]>") Signed-off-by: Nicolas Dichtel <[email protected]> Tested-by: Aurélien Degeorges <[email protected]> Acked-by: Philippe Guibert <[email protected]>
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-PULLREQ2-5690/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
|
@idryzhov , please review this pull request |
Using strtol() to compare two strings is a bad idea.
Before the patch, if_cmp_name_func() may confuse foo001 and foo1.
Fixes: 106d2fd ("2003-08-01 Cougar [email protected]")
Signed-off-by: Nicolas Dichtel [email protected]
Acked-by: Philippe Guibert [email protected]