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:
parent
f5b7d681c7
commit
48a3b5c6db
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user