Commit 5b8f179f authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

sockets: skip errors from collecting of netlink and packet sockets

The packet diag are not compiled in Fedora 19 kernel.
The netlink diag is going to be merged in 3.10.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 4a6ed332
......@@ -515,15 +515,23 @@ int collect_sockets(int pid)
req.r.p.pdiag_show = PACKET_SHOW_INFO | PACKET_SHOW_MCLIST |
PACKET_SHOW_FANOUT | PACKET_SHOW_RING_CFG;
tmp = do_rtnl_req(nl, &req, sizeof(req), packet_receive_one, NULL);
if (tmp)
err = tmp;
if (tmp) {
if (tmp == -ENOENT) /* Fedora 19 */
pr_warn("The currect kernel doesn't support packet_diag\n");
else
err = tmp;
}
req.r.n.sdiag_family = AF_NETLINK;
req.r.n.sdiag_protocol = NDIAG_PROTO_ALL;
req.r.n.ndiag_show = NDIAG_SHOW_GROUPS;
tmp = do_rtnl_req(nl, &req, sizeof(req), netlink_receive_one, NULL);
if (tmp)
err = tmp;
if (tmp) {
if (tmp == -ENOENT) /* Going to be in 3.10 */
pr_warn("The currect kernel doesn't support netlink_diag\n");
else
err = tmp;
}
close(nl);
out:
......
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