netlink: allow force remove on pinned delete from route binary

Taken from: https://reviews.freebsd.org/D46301
This commit is contained in:
Franco Fichtner 2024-12-03 14:48:17 +01:00
parent 305b65589a
commit b588ace010

View file

@ -1013,7 +1013,8 @@ rtnl_handle_delroute(struct nlmsghdr *hdr, struct nlpcb *nlp,
}
error = rib_del_route_px(attrs.rta_table, attrs.rta_dst,
attrs.rtm_dst_len, path_match_func, &attrs, 0, &rc);
attrs.rtm_dst_len, path_match_func, &attrs,
(attrs.rta_rtflags & RTF_PINNED) ? RTM_F_FORCE : 0, &rc);
if (error == 0)
report_operation(attrs.rta_table, &rc, nlp, hdr);
return (error);