mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 14:55:39 +00:00
sockets: Make crtools check report error when DIAG is incomplete
Absense of packet and netlink diag is OK at dump -- we can be on older kernel and will fail later if _really_ need these sockets. During check stage all diag is expected to be in place. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -602,7 +602,7 @@ int collect_sockets(int pid)
|
|||||||
PACKET_SHOW_FANOUT | PACKET_SHOW_RING_CFG;
|
PACKET_SHOW_FANOUT | PACKET_SHOW_RING_CFG;
|
||||||
tmp = do_collect_req(nl, &req, sizeof(req), packet_receive_one, NULL);
|
tmp = do_collect_req(nl, &req, sizeof(req), packet_receive_one, NULL);
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
if (tmp == -ENOENT) /* Fedora 19 */
|
if (pid != 0 && tmp == -ENOENT) /* Fedora 19 */
|
||||||
pr_warn("The currect kernel doesn't support packet_diag\n");
|
pr_warn("The currect kernel doesn't support packet_diag\n");
|
||||||
else
|
else
|
||||||
err = tmp;
|
err = tmp;
|
||||||
@@ -613,7 +613,7 @@ int collect_sockets(int pid)
|
|||||||
req.r.n.ndiag_show = NDIAG_SHOW_GROUPS;
|
req.r.n.ndiag_show = NDIAG_SHOW_GROUPS;
|
||||||
tmp = do_collect_req(nl, &req, sizeof(req), netlink_receive_one, NULL);
|
tmp = do_collect_req(nl, &req, sizeof(req), netlink_receive_one, NULL);
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
if (tmp == -ENOENT) /* Going to be in 3.10 */
|
if (pid != 0 && tmp == -ENOENT) /* Going to be in 3.10 */
|
||||||
pr_warn("The currect kernel doesn't support netlink_diag\n");
|
pr_warn("The currect kernel doesn't support netlink_diag\n");
|
||||||
else
|
else
|
||||||
err = tmp;
|
err = tmp;
|
||||||
|
Reference in New Issue
Block a user