Commit 7bdba0f7 authored by Pavel Emelyanov's avatar Pavel Emelyanov

unix: Add _all_ peers into must-dump list

When dumping a unix socket we must make sure, that all connections
are dumped or -x option is used. Currently only peers with non-matching
ids are added into check. Fix this.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 6a0f9257
...@@ -168,15 +168,15 @@ static int dump_one_unix_fd(int lfd, u32 id, const struct fd_parms *p) ...@@ -168,15 +168,15 @@ static int dump_one_unix_fd(int lfd, u32 id, const struct fd_parms *p)
ue.ino, ue.peer, peer->peer_ino, peer->name); ue.ino, ue.peer, peer->peer_ino, peer->name);
goto err; goto err;
} }
}
/* /*
* It can be external socket, so we defer dumping * It can be external socket, so we defer dumping
* until all sockets the program owns are processed. * until all sockets the program owns are processed.
*/ */
if (!peer->sd.already_dumped && list_empty(&peer->list)) { if (!peer->sd.already_dumped && list_empty(&peer->list)) {
show_one_unix("Add a peer", peer); show_one_unix("Add a peer", peer);
list_add_tail(&peer->list, &unix_sockets); list_add_tail(&peer->list, &unix_sockets);
}
} }
if ((ue.type != SOCK_DGRAM) && ( if ((ue.type != SOCK_DGRAM) && (
......
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