Phil Sutter <phil@xxxxxx> wrote: > +void nftnl_attr_put_ifname(struct nlmsghdr *nlh, int attr, const char *ifname) > +{ > + int len = strlen(ifname) + 1; Nit: size_t len. > +const char *nftnl_attr_get_ifname(struct nlattr *attr) > +{ > + size_t slen = mnl_attr_get_payload_len(attr); > + const char *dev = mnl_attr_get_str(attr); > + static char buf[IFNAMSIZ]; I missed this on my last review, sorry: Please pass "char buf[IFNAMESIZ]" as argument. Returning pointer to a static buffer breaks thread safety of libnftables. Alternatively you could always return a malloc'd buffer and force caller to free it. Up to you.