* Enhanced decoding of SO_PEERCRED option of getsockopt syscall.
* Enhanced decoding of IP_ADD_MEMBERSHIP, IP_DROP_MEMBERSHIP,
IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP, IPV6_JOIN_ANYCAST,
- and IPV6_LEAVE_ANYCAST options of setsockopt syscall.
+ IPV6_LEAVE_ANYCAST, MCAST_JOIN_GROUP, and MCAST_LEAVE_GROUP options
+ of setsockopt syscall.
* Implemented decoding of linux socket filter programs specified
for SO_ATTACH_FILTER and SO_ATTACH_REUSEPORT_CBPF socket options.
#ifdef MCAST_JOIN_GROUP
static void
-print_group_req(struct tcb *const tcp, const kernel_ulong_t addr, const int len)
+print_group_req(struct tcb *const tcp, const kernel_ulong_t addr,
+ const int len)
{
struct group_req greq;
- if (len != sizeof(greq) ||
- umove(tcp, addr, &greq) < 0) {
+ if (len < (int) sizeof(greq)) {
printaddr(addr);
- return;
+ } else if (!umove_or_printaddr(tcp, addr, &greq)) {
+ PRINT_FIELD_IFINDEX("{", greq, gr_interface);
+ PRINT_FIELD_SOCKADDR(", ", greq, gr_group);
+ tprints("}");
}
-
- PRINT_FIELD_IFINDEX("{", greq, gr_interface);
- PRINT_FIELD_SOCKADDR(", ", greq, gr_group);
- tprints("}");
-
}
#endif /* MCAST_JOIN_GROUP */