netlink socket correct check (#15720)
This commit is contained in:
@@ -283,7 +283,7 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *ret_mcast_gr
|
||||
struct cmsghdr *cmsg;
|
||||
|
||||
cmsg = cmsg_find(&msg, SOL_NETLINK, NETLINK_PKTINFO, CMSG_LEN(sizeof(struct nl_pktinfo)));
|
||||
if (ret_mcast_group)
|
||||
if (cmsg)
|
||||
*ret_mcast_group = ((struct nl_pktinfo*) CMSG_DATA(cmsg))->group;
|
||||
else
|
||||
*ret_mcast_group = 0;
|
||||
|
||||
Reference in New Issue
Block a user