static int
print_nlmsghdr(struct tcb *tcp,
const int fd,
int family,
const struct nlmsghdr *const nlmsghdr)
{
...
const int hdr_family = (nlmsghdr->nlmsg_type < NLMSG_MIN_TYPE)
? NL_FAMILY_DEFAULT
: (family != NL_FAMILY_DEFAULT
? family : get_fd_nl_family(tcp, fd));
...
}
Get family is in this function,
if type = NLMSG_DONE (NLMSG_DONE < NLMSG_MIN_TYPE),
family = NL_FAMILY_DEFAULT. So in the decode_payload
(unsigned int) family < ARRAY_SIZE(netlink_decoders) is false.
static void
decode_payload(struct tcb *const tcp,
const int fd,
const int family,
const struct nlmsghdr *const nlmsghdr,
const kernel_ulong_t addr,
const kernel_ulong_t len)
{
...
if ((unsigned int) family < ARRAY_SIZE(netlink_decoders)
&& netlink_decoders[family]
&& netlink_decoders[family](tcp, nlmsghdr, addr, len)) {
return;
}
...
}
If enter decode_netlink_sock_diag, it only return true, following code
never execute.
static void
decode_payload(struct tcb *const tcp,
const int fd,
const int family,
const struct nlmsghdr *const nlmsghdr,
const kernel_ulong_t addr,
const kernel_ulong_t len)
{
...
if (nlmsghdr->nlmsg_type == NLMSG_DONE && len == sizeof(int)) {
int num;
if (!umove_or_printaddr(tcp, addr, &num))
tprintf("%d", num);
return;
}
...
}
--
JingPiao Chen
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel