Skip to content

Commit

Permalink
net/linux/addrs: fix netlink kernel warnings
Browse files Browse the repository at this point in the history
netlink: 4 bytes leftover after parsing attributes in process 'baresip'.
  • Loading branch information
sreimers committed Dec 25, 2024
1 parent 6983845 commit b2d9055
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/net/linux/addrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ int net_netlink_addrs(net_ifaddr_h *ifh, void *arg)

struct {
struct nlmsghdr nlh;
struct ifaddrmsg ifa;
union {
struct ifinfomsg ifi;
struct ifaddrmsg ifa;
} u;
} req;

if (!ifh)
Expand All @@ -166,7 +169,7 @@ int net_netlink_addrs(net_ifaddr_h *ifh, void *arg)

/* GETLINK */
memset(&req, 0, sizeof(req));
req.nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg));
req.nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
req.nlh.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP;
req.nlh.nlmsg_type = RTM_GETLINK;

Expand Down

0 comments on commit b2d9055

Please sign in to comment.