Re: [PATCH 4/4] Handle unconnected DGRAM sockets with buffers in-flight

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Dan Smith wrote:
> This patch avoids connecting an unconnected DGRAM socket to a fake peer as
> part of the restore process.  Note that it will appear to rewrite all packets
> received as coming from a single unbound sender.

Hmm.. I think this would break recvfrom() syscall:  it eventually calls
unix_dgram_recvmsg(), which grabs the next skb (datagram) in the queue,
and fills in the address of the socket from which the datagram had been
sent (af_unix.c:1672)

	if (msg->msg_name)
		unix_copy_addr(msg, skb->sk);

?

The more I think about it, it seems better to also checkpoint those
unconnected sockets that are the source of dgrams. IOW, when looping
through the received skb's of an unconnected dgram socket, then check
the skb->sk of each pending packet, and checkpoint that socket too.

And in restore, restore those too, even though they may be orphan
(closed, not referenced by any process anymore), and send each packet
from the correct origin socket.

This, btw, will be another case of sock without sk->sk_socket...

Oren.

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux