Commit 09ebdd45 authored by Pavel Emelyanov's avatar Pavel Emelyanov

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: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 7bdba0f7
...@@ -602,7 +602,7 @@ int collect_sockets(int pid) ...@@ -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) ...@@ -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;
......
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