Re: [PATCH nft 2/2] src: restore interface to index cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 06, 2015 at 02:39:26PM +0200, Patrick McHardy wrote:
> Am 6. April 2015 14:06:31 MESZ, schrieb Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>:
[...]
> >+static int data_cb(const struct nlmsghdr *nlh, void *data)
> >+{
> >+	struct nlattr *tb[IFLA_MAX + 1] = {};
> >+	struct ifinfomsg *ifm = mnl_nlmsg_get_payload(nlh);
> >+	struct iface *iface;
> >+
> >+	iface = malloc(sizeof(struct iface));
> >+	if (iface == NULL)
> >+		memory_allocation_error();
> 
> Why not use x*alloc here?

Just changed this here, thanks.

BTW, not important but I'm still seeing netlink traffic here to
NETLINK_ROUTE.  Looking at the glibc code, it seems that getaddrinfo()
also internally retrieves the list of interfaces via netlink for each
call.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux