Commit 4d4bf247 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Andrei Vagin

sockets: Don't exit with error if raw module unloaded

In regular checkpoint (not "check" action) current
architecture implies that basic diag modules such as
tcp/udp and etc will be loaded. In turn raw diag in
most case is either unloaded or even not compiled in
the system.

Thus for them just zap an error (but print this information
inside log). If an application does use raw sockets in real
we will fail later when being checkpointing the sockets
itselves.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@gmail.com>
parent d1212cab
......@@ -743,6 +743,18 @@ static int collect_err(int err, struct ns_id *ns, void *arg)
*/
if (err == -ENOENT) {
pr_debug("%s: %d\n", msg, err);
/*
* Unlike other modules RAW sockets are
* always optional and not commonly used.
* Currently we warn user about lack of
* a particular module support in "check"
* procedure. Thus don't fail on lack of
* RAW diags in a regular dump. If we meet
* a raw socket we will simply fail on dump
* procedure because it won't be resolved.
*/
if (gr->protocol == IPPROTO_RAW)
return 0;
return -ENOENT;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment