[Devel] [PATCH] Pass the stored sock->protocol into sock_create() on restore
Dan Smith
danms at us.ibm.com
Thu Oct 8 11:14:03 PDT 2009
This should be fine because the protocol sanity-checks the number to
make sure it's valid given the type specified.
Cc: John Dykstra <john.dykstra1 at gmail.com>
Cc: Oren Laadan <orenl at librato.com>
Signed-off-by: Dan Smith <danms at us.ibm.com>
---
net/checkpoint.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/checkpoint.c b/net/checkpoint.c
index 9a72aae..dd23efd 100644
--- a/net/checkpoint.c
+++ b/net/checkpoint.c
@@ -687,7 +687,8 @@ struct sock *do_sock_restore(struct ckpt_ctx *ctx)
/* silently clear flags, e.g. SOCK_NONBLOCK or SOCK_CLOEXEC */
h->sock.type &= SOCK_TYPE_MASK;
- ret = sock_create(h->sock_common.family, h->sock.type, 0, &sock);
+ ret = sock_create(h->sock_common.family, h->sock.type,
+ h->sock.protocol, &sock);
if (ret < 0)
goto err;
--
1.6.2.5
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list