ur array to a pointer to an array (you'll get
a build failure instead of 0).
--
Alex Gartrell
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info
k family. We welcome your pull requests :)
--
Alex Gartrell
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Hello Al,
On 12/26/14 2:56 PM, Al Viro wrote:
On Thu, Dec 25, 2014 at 10:50:23PM -0800, Alex Gartrell wrote:
Currently the "is-socket" test for a file compares the ops table pointer,
which is static and local to the socket.c. Instead, this adds a flag for
private_data_is_socket.
return file->private_data; /* set in sock_map_fd */
*err = -ENOTSOCK;
Not sure it's the best method, how about a dedicated f_op to do this?
So like a get_socket operation? That would simplify this a lot,
certainly (we wouldn't need to move private_data around in the tu
Hello Jason,
Thanks for commenting.
On 12/26/14 4:43 AM, Jason Wang wrote:
On 12/26/2014 02:50 PM, Alex Gartrell wrote:
By setting private_data to a socket and private_data_is_socket to true, we
can use the socket syscalls. We also can't just blindly use private_data
anymore, so ther
Instead of -1 with EAGAIN, read on a O_NONBLOCK tun fd will return 0. This
fixes this by properly returning the error code from __skb_recv_datagram.
Signed-off-by: Alex Gartrell
---
drivers/net/tun.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/tun.c b
Validated that this was actually using the unsigned comparison with gdb.
Signed-off-by: Alex Gartrell
---
drivers/net/tun.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index a5cbf67..6c63e21 100644
--- a/drivers/net/tun.c
+++ b
Currently the "is-socket" test for a file compares the ops table pointer,
which is static and local to the socket.c. Instead, this adds a flag for
private_data_is_socket. This is an exceptionally long commit message for a
two-line patch.
Signed-off-by: Alex Gartrell
---
include/linu
By setting private_data to a socket and private_data_is_socket to true, we
can use the socket syscalls. We also can't just blindly use private_data
anymore, so there's a __tun_file_get function that returns the container_of
private_data appropriately.
Signed-off-by: Alex Gartrell
--
There is an underlying socket object in struct tun that isn't accessible,
so if you try to do a recvmmsg on a tun file descriptor you'll get an
error. This small patchset allows external file objects to claim socket
status and enables it for tun_files.
Alex Gartrell (2):
socket: Allo
Hey Herbert,
On 12/22/2014 02:34 PM, Herbert Xu wrote:
On Mon, Dec 22, 2014 at 12:18:39PM -0800, Alex Gartrell wrote:
While fully aware that this makes me look like an idiot, I have to
admit that I've tried and failed to figure out how to get a socket
fd out of the tun device.
Well
e right way to do
this either.
Thanks,
--
Alex Gartrell
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
same L2 network (single hop through a top-of-rack switch).
Signed-off-by: Alex Gartrell
---
drivers/net/tun.c | 66 ++---
include/uapi/linux/if_tun.h | 3 +++
2 files changed, 60 insertions(+), 9 deletions(-)
diff --git a/drivers/net/tun.c b
13 matches
Mail list logo