diff options
-rw-r--r-- | include/netlink-private/types.h | 2 | ||||
-rw-r--r-- | lib/route/link.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/netlink-private/types.h b/include/netlink-private/types.h index 60a3bce..89f6418 100644 --- a/include/netlink-private/types.h +++ b/include/netlink-private/types.h @@ -183,6 +183,8 @@ struct rtnl_link uint32_t l_num_rx_queues; uint32_t l_group; uint8_t l_carrier; + /* 3 byte hole */ + struct rtnl_link_af_ops * l_af_ops; }; struct rtnl_ncacheinfo diff --git a/lib/route/link.c b/lib/route/link.c index e395529..752f63a 100644 --- a/lib/route/link.c +++ b/lib/route/link.c @@ -201,6 +201,8 @@ static void link_free_data(struct nl_object *c) if ((io = link->l_info_ops) != NULL) release_link_info(link); + rtnl_link_af_ops_put(link->l_af_ops); + nl_addr_put(link->l_addr); nl_addr_put(link->l_bcast); @@ -313,6 +315,8 @@ static int link_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who, af_ops->ao_protinfo_policy, sizeof(struct nla_policy)); } + + link->l_af_ops = af_ops; } err = nlmsg_parse(n, sizeof(*ifi), tb, IFLA_MAX, link_policy); |