gh-127072: Remove outdated `socket.NETLINK_*` constants. (GH-127256)

Remove seriously outdated netlink constants.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
This commit is contained in:
RUANG (James Roy) 2024-11-27 14:53:41 +08:00 committed by GitHub
parent 71ede1142d
commit 6d3b5206cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 18 deletions

View File

@ -0,0 +1 @@
Remove outdated ``socket.NETLINK_*`` constants not present in Linux kernels beyond 2.6.17.

View File

@ -7594,36 +7594,20 @@ socket_exec(PyObject *m)
/* */
ADD_INT_MACRO(m, AF_NETLINK);
ADD_INT_MACRO(m, NETLINK_ROUTE);
#ifdef NETLINK_SKIP
ADD_INT_MACRO(m, NETLINK_SKIP);
#endif
#ifdef NETLINK_W1
ADD_INT_MACRO(m, NETLINK_W1);
#endif
ADD_INT_MACRO(m, NETLINK_USERSOCK);
ADD_INT_MACRO(m, NETLINK_FIREWALL);
#ifdef NETLINK_TCPDIAG
ADD_INT_MACRO(m, NETLINK_TCPDIAG);
#endif
#ifdef NETLINK_NFLOG
ADD_INT_MACRO(m, NETLINK_NFLOG);
#endif
#ifdef NETLINK_XFRM
ADD_INT_MACRO(m, NETLINK_XFRM);
#endif
#ifdef NETLINK_ARPD
ADD_INT_MACRO(m, NETLINK_ARPD);
#endif
#ifdef NETLINK_ROUTE6
ADD_INT_MACRO(m, NETLINK_ROUTE6);
#endif
#ifdef NETLINK_IP6_FW
ADD_INT_MACRO(m, NETLINK_IP6_FW);
#endif
#ifdef NETLINK_DNRTMSG
ADD_INT_MACRO(m, NETLINK_DNRTMSG);
#endif
#ifdef NETLINK_TAPBASE
ADD_INT_MACRO(m, NETLINK_TAPBASE);
#endif
#ifdef NETLINK_CRYPTO
ADD_INT_MACRO(m, NETLINK_CRYPTO);
#endif