static int lxc_ip_route_dest(__u16 nlmsg_type, int family, int ifindex, void *dest, unsigned int netmask)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int addrlen, err;
struct rtmsg *rt;
static int lxc_ip_neigh_proxy(__u16 nlmsg_type, int family, int ifindex, void *dest)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int addrlen, err;
struct ndmsg *rt;
static int lxc_bridge_vlan(unsigned int ifindex, unsigned short operation, unsigned short vlan_id, bool tagged)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int err;
struct ifinfomsg *ifi;
static int lxc_ipvlan_create(const char *parent, const char *name, int mode, int isolation)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int err, index, len;
struct ifinfomsg *ifi;
static int lxc_netdev_move_by_index_fd(int ifindex, int fd, const char *ifname)
{
call_cleaner(nlmsg_free) struct nlmsg *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int err;
struct ifinfomsg *ifi;
int lxc_netdev_move_by_index(int ifindex, pid_t pid, const char *ifname)
{
call_cleaner(nlmsg_free) struct nlmsg *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int err;
struct ifinfomsg *ifi;
int lxc_netdev_delete_by_index(int ifindex)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int err;
struct ifinfomsg *ifi;
int lxc_netdev_rename_by_index(int ifindex, const char *newname)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int err, len;
struct ifinfomsg *ifi;
int netdev_set_flag(const char *name, int flag)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int err, index, len;
struct ifinfomsg *ifi;
static int netdev_get_flag(const char *name, int *flag)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int err, index, len;
struct ifinfomsg *ifi;
int netdev_get_mtu(int ifindex)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int readmore = 0;
__u32 recv_len = 0;
int lxc_netdev_set_mtu(const char *name, int mtu)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int err, len;
struct ifinfomsg *ifi;
int n_rxqueues, int n_txqueues)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int err, len;
struct ifinfomsg *ifi;
int lxc_vlan_create(const char *parent, const char *name, unsigned short vlanid)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int err, len, lindex;
struct ifinfomsg *ifi;
int lxc_macvlan_create(const char *parent, const char *name, int mode)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int err, index, len;
struct ifinfomsg *ifi;
void *acast, int prefix)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int addrlen, err;
struct ifaddrmsg *ifa;
static int ip_addr_get(int family, int ifindex, void **res)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int answer_len, err;
struct ifaddrmsg *ifa;
static int ip_gateway_add(int family, int ifindex, void *gw)
{
call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int addrlen, err;
struct rtmsg *rt;
char buf[NLMSG_ALIGN(sizeof(struct nlmsghdr)) +
NLMSG_ALIGN(sizeof(struct rtgenmsg)) +
NLMSG_ALIGN(1024)];
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
struct nlmsghdr *hdr;
struct rtgenmsg *msg;
int lxc_netns_get_nsid(int fd)
{
- struct nl_handler nlh;
+ struct nl_handler nlh = NL_HANDLER_INIT;
call_cleaner(netlink_close) struct nl_handler *nlh_ptr = &nlh;
int ret;
ssize_t len;