On Mon, Aug 29, 2016 at 07:52:34AM +0100, Khawar Shehzad wrote: > ifm = mnl_nlmsg_put_extra_header(nlh, sizeof(*ifm)); > > ifm->ifa_family = AF_INET6; > ifm->ifa_prefixlen = 64; > ifm->ifa_flags = IFA_F_PERMANENT; > ifm->ifa_scope = RT_SCOPE_UNIVERSE; > /* TODO get interaface name from user or configuration*/ > ifm->ifa_index = if_nametoindex("eth0"); > unsigned char eipn[16]; > inet_pton(AF_INET6, eip, eipn); eipn should be 'struct in6_addr' instead. > mnl_attr_put(nlh, IFA_ADDRESS, 16,eipn); So this looks like: mnl_attr_put(nlh, IFA_ADDRESS, sizeof(eipn), &eipn); -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html