Pass the stored sock->protocol into sock_create() on restore
PATCH 1/1 Pass the stored sock->protocol into sock_create() on restore
This should be fine because the protocol sanity-checks the number to make sure it's valid given the type specified.
Cc John Dykstra <[email protected]>
Cc Oren Laadan <[email protected]>
Signed-off-by Dan Smith <danms-r/[email protected]>
--- net/checkpoint.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
net/checkpoint.c +2 -1
@@ -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;
Signature · 1 line
1.6.2.5