| 1 | Ref https://github.com/Silicondust/libhdhomerun/pull/40 |
| 2 | |
| 3 | |
| 4 | |
| 5 | bool hdhomerun_local_ip_info2(int af, hdhomerun_local_ip_info2_callback_t callba |
| 6 | |
| 7 | struct nlmsghdr_ifaddrmsg req; |
| 8 | memset(&req, 0, sizeof(req)); |
| 9 | - req.nlh.nlmsg_len = NLMSG_ALIGN(NLMSG_LENGTH(sizeof(req))); |
| 10 | + req.nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifaddrmsg)); |
| 11 | req.nlh.nlmsg_type = RTM_GETADDR; |
| 12 | req.nlh.nlmsg_flags = NLM_F_REQUEST | NLM_F_MATCH; |
| 13 | req.msg.ifa_family = af; |