-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-27584: New addition of vSockets to the python socket module #2489
Changes from all commits
2f7bdaa
bec6612
c3027e5
d11a8db
ce380ae
0f653c6
42026f3
c3a9490
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
``AF_VSOCK`` has been added to the socket interface which allows | ||
communication between virtual machines and their host. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,12 @@ typedef int socklen_t; | |
#define SOL_ALG 279 | ||
#endif | ||
|
||
#ifdef HAVE_LINUX_VM_SOCKETS_H | ||
# include <linux/vm_sockets.h> | ||
#else | ||
# undef AF_VSOCK | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It needs to be there. In the case that vm_sockets.h is not available in include/linux which is the case on the last build bot run. Not all of the bots have the newer kernel.That way the code dependent on vm_sockets.h (AF_VSOCK) will not try to compile. checking for linux/vm_sockets.h... no This is also the way its done it at the top of socketmodule.h with AF_NETLINK I also noticed AF_CAN was not adding the #undef AF_CAN in socketmodule.h so I renamed linux/can.h, ran configure and make and sure enough any code conditionally compiling under #ifdef AF_CAN in socketmodule.c failed. |
||
#endif | ||
|
||
/* Linux 3.19 */ | ||
#ifndef ALG_SET_AEAD_ASSOCLEN | ||
#define ALG_SET_AEAD_ASSOCLEN 4 | ||
|
@@ -193,6 +199,9 @@ typedef union sock_addr { | |
#ifdef HAVE_SOCKADDR_ALG | ||
struct sockaddr_alg alg; | ||
#endif | ||
#ifdef AF_VSOCK | ||
struct sockaddr_vm vm; | ||
#endif | ||
} sock_addr_t; | ||
|
||
/* The object holding a socket. It holds some extra information, | ||
|
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.
This is the line failing in the Travis. https://travis-ci.org/python/cpython/jobs/248412030#L2063
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.
You don't have the proper headers.
checking for linux/vm_sockets.h... no
So it looks like my checking for HAVE_LINUX_VM_SOCKETS_H is faulty.
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.
Okay, so please update that, and push in your branch, the bots will pick up the changes and will test.
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.
I've restored the original aclocal.m4 and fixed the issues you pointed out.
Thank you for your review,
Cathy