aboutsummaryrefslogtreecommitdiff
path: root/sys/netlink/route/rt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netlink/route/rt.c')
-rw-r--r--sys/netlink/route/rt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c
index 00315afbcb02..c9b0f56498ec 100644
--- a/sys/netlink/route/rt.c
+++ b/sys/netlink/route/rt.c
@@ -350,10 +350,10 @@ static void
report_operation(uint32_t fibnum, struct rib_cmd_info *rc,
struct nlpcb *nlp, struct nlmsghdr *hdr)
{
- struct nl_writer nw = {};
+ struct nl_writer nw;
uint32_t group_id = family_to_group(rt_get_family(rc->rc_rt));
- if (nlmsg_get_group_writer(&nw, NLMSG_SMALL, NETLINK_ROUTE, group_id)) {
+ if (nl_writer_group(&nw, NLMSG_SMALL, NETLINK_ROUTE, group_id, false)) {
struct route_nhop_data rnd = {
.rnd_nhop = rc_get_nhop(rc),
.rnd_weight = rc->rc_nh_weight,
@@ -1043,7 +1043,7 @@ rtnl_handle_getroute(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *
void
rtnl_handle_route_event(uint32_t fibnum, const struct rib_cmd_info *rc)
{
- struct nl_writer nw = {};
+ struct nl_writer nw;
int family, nlm_flags = 0;
family = rt_get_family(rc->rc_rt);
@@ -1082,7 +1082,8 @@ rtnl_handle_route_event(uint32_t fibnum, const struct rib_cmd_info *rc)
};
uint32_t group_id = family_to_group(family);
- if (!nlmsg_get_group_writer(&nw, NLMSG_SMALL, NETLINK_ROUTE, group_id)) {
+ if (!nl_writer_group(&nw, NLMSG_SMALL, NETLINK_ROUTE, group_id,
+ false)) {
NL_LOG(LOG_DEBUG, "error allocating event buffer");
return;
}