1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-21 02:50:18 +03:00

netlink socket correct check (#15720)

This commit is contained in:
gaurav 2020-05-07 03:55:31 -04:00 committed by GitHub
parent f5b7d681c7
commit 48a3b5c6db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;