-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
gh-100218: correctly set errno when socket.if_{nametoindex,indextoname} raise OSError
#140905
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
gh-100218: correctly set errno when socket.if_{nametoindex,indextoname} raise OSError
#140905
Conversation
|
I used https://man.cx/if_nametoindex#heading5 for the default errors of each function. |
|
🤖 New build scheduled with the buildbot fleet by @picnixz for commit 551a199 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F140905%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
|
All failures are urllib2net failures that already track: #140748. |
vstinner
left a comment
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
|
Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…ndextoname}` raise `OSError` (pythonGH-140905) Previously, socket.if_nametoindex() and socket.if_indextoname() could raise an `OSError` with a `None` errno. Now, the errno from libc is propagated. (cherry picked from commit 3ce2d57) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
GH-141284 is a backport of this pull request to the 3.14 branch. |
|
Sorry, @picnixz, I could not cleanly backport this to |
…index,indextoname}` raise `OSError` (pythonGH-140905) Previously, socket.if_nametoindex() and socket.if_indextoname() could raise an `OSError` with a `None` errno. Now, the errno from libc is propagated. (cherry picked from commit 3ce2d57) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
GH-141285 is a backport of this pull request to the 3.13 branch. |
…indextoname}` raise `OSError` (GH-140905) (#141284) gh-100218: correctly set `errno` when `socket.if_{nametoindex,indextoname}` raise `OSError` (GH-140905) Previously, socket.if_nametoindex() and socket.if_indextoname() could raise an `OSError` with a `None` errno. Now, the errno from libc is propagated. (cherry picked from commit 3ce2d57) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
socket.if_nametoindex('no-such-iface')raisesOSError()without settingerrno#100218