gh-104061: Add socket.SO_BINDTOIFINDEX constant (GH-104062)

Add socket.SO_BINDTOIFINDEX constant

This socket option avoids a race condition between SO_BINDTODEVICE and network interface renaming.
This commit is contained in:
Victor Westerhuis 2024-02-20 22:08:15 +01:00 committed by GitHub
parent 142502ea8d
commit e1fdc3c323
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 0 deletions

View file

@ -7927,6 +7927,9 @@ socket_exec(PyObject *m)
#ifdef SO_BINDTODEVICE
ADD_INT_MACRO(m, SO_BINDTODEVICE);
#endif
#ifdef SO_BINDTOIFINDEX
ADD_INT_MACRO(m, SO_BINDTOIFINDEX);
#endif
#ifdef SO_PRIORITY
ADD_INT_MACRO(m, SO_PRIORITY);
#endif