Fix Link-Local IPv6 Flags in the Resolver#9032
Conversation
Resolver class. Based on commit aio-libs@c48f2d1, the original use of the NI_NUMERICSERV and NI_NUMERICHOST flags was correct for the getnameinfo() call. As of aio-libs@38dd9b8 the incorrect flags are now being used. Changed AI_* flags back to NI_* flags. Changed corresponding test. Change-Id: I8b29ce2f39ea1cc097f4165b8ec55230f3b8eb6f
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #9032 +/- ##
=======================================
Coverage 98.30% 98.30%
=======================================
Files 107 107
Lines 34355 34362 +7
Branches 4066 4066
=======================================
+ Hits 33771 33778 +7
Misses 412 412
Partials 172 172
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Dreamsorcerer
left a comment
There was a problem hiding this comment.
@bdraco is probably more familiar with this than me, but I think this looks right.
I'm also wondering if we can have a test that actually produces the exception in the original bug report?
bdraco
left a comment
There was a problem hiding this comment.
Looks like a good fix to me. 👍
Good catch
|
Would be good to get a test for this case as well |
Would it be best to add a test that has a mock side effect that causes the exception? |
I would try to keep the mocking an minimal as possible but avoid doing any network I/O |
case. Fixed various formatting errors in changelog and remove unused variables from test file. Change-Id: I47e9141ed0e819a6e9bac52abd48ebbb9adb8da1
Change-Id: I00525e397a11bd5c6e4985d8672b8f63188a6f90
|
Put up another commit with an alteration of an existing test and some various formatting errors fixed. I did not add a test for the behavior described in the bug report as that requires network I/O and/or testing the socket library, which I'm not sure makes sense here. |
|
Thanks @GitNMLee |
Backport to 3.10: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply c693a81 on top of patchback/backports/3.10/c693a816ce84d46c445841c707f23e31f174cf28/pr-9032 Backporting merged PR #9032 into master
🤖 @patchback |
Backport to 3.11: 💚 backport PR created✅ Backport PR branch: Backported as #9047 🤖 @patchback |
Co-authored-by: Nathan Lee <nathan.lee@garmin.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sam Bull <git@sambull.org> Co-authored-by: J. Nick Koston <nick@koston.org> (cherry picked from commit c693a81)
Co-authored-by: Nathan Lee <nathan.lee@garmin.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sam Bull <git@sambull.org> Co-authored-by: J. Nick Koston <nick@koston.org> (cherry picked from commit c693a81)
Co-authored-by: Nathan Lee <nathan.lee@garmin.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sam Bull <git@sambull.org> Co-authored-by: J. Nick Koston <nick@koston.org> (cherry picked from commit c693a81) Change-Id: I19977c5d84a9236bdddcaf025040ca68e18e77e4
…esolver (#9048) Co-authored-by: Nathan Lee <nathan.lee@garmin.com> Co-authored-by: pre-commit-ci[bot] Co-authored-by: Sam Bull <git@sambull.org> Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: GitNMLee <89409038+GitNMLee@users.noreply.github.com>
Based on commit c48f2d1, the original use of the NI_NUMERICSERV and NI_NUMERICHOST flags was correct for the getnameinfo() call. As of 38dd9b8 the incorrect flags are now being used. Changed AI_* flags back to NI_* flags. Changed corresponding test.
Related issue number
Fixes #9028