mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
sk-queue: use flags in dump_sk_queue
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> (cherry picked from commit 8b83405614703211fee27f90f08450cba080a44c) Ahmed Elaidy: - adapted onto the upstream 2-arg dump_sk_queue(): upstream has no netlink queue dump, so there was no bool dump_addr argument to convert; introduce int flags on the 2-arg base and update the only caller (unix sockets). No sk-netlink.c change for the same reason. Signed-off-by: Ahmed Elaidy <elaidya225@gmail.com> Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
This commit is contained in:
parent
56aecf2594
commit
86a3c42dda
3 changed files with 4 additions and 3 deletions
|
|
@ -2,7 +2,8 @@
|
|||
#define __CR_SK_QUEUE_H__
|
||||
|
||||
extern struct collect_image_info sk_queues_cinfo;
|
||||
extern int dump_sk_queue(int sock_fd, int sock_id);
|
||||
|
||||
extern int dump_sk_queue(int sock_fd, int sock_id, int flags);
|
||||
extern int restore_sk_queue(int fd, unsigned int peer_id);
|
||||
|
||||
#endif /* __CR_SK_QUEUE_H__ */
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ static void release_cmsg(SkPacketEntry *pe)
|
|||
pe->scm = NULL;
|
||||
}
|
||||
|
||||
int dump_sk_queue(int sock_fd, int sock_id)
|
||||
int dump_sk_queue(int sock_fd, int sock_id, int flags)
|
||||
{
|
||||
SkPacketEntry pe = SK_PACKET_ENTRY__INIT;
|
||||
int ret, size, orig_peek_off;
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@ static int dump_one_unix_fd(int lfd, uint32_t id, const struct fd_parms *p)
|
|||
* (i stands for in-flight, cons -- for connections) things.
|
||||
*/
|
||||
if (sk->rqlen != 0 && sk->state != TCP_LISTEN) {
|
||||
if (dump_sk_queue(lfd, id))
|
||||
if (dump_sk_queue(lfd, id, 0))
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue