HomeFreeBSD

netlink: return optional metadata with the operation result.

Description

netlink: return optional metadata with the operation result.

Some operations like interface creation may need to return metadata

  • in this case, interface name - back to the caller if the operation is successful.

This change implements attaching an NLMSGERR_ATTR_COOKIE nla to the
operation reply message via nlmsg_report_cookie().
Additionally, on successful interface creation, interface index and
interface name are returned in the IFLA_NEW_IFINDEX and `IFLA_IFNAME
TLVs, encapsulated in the NLMSGERR_ATTR_COOKIE.

Reviewed By: pauamma
Differential Revision: https://reviews.freebsd.org/D38283
MFC after: 1 week

Details

Provenance
melifaroAuthored on Feb 9 2023, 2:53 PM
Reviewer
pauamma_gundo.com
Differential Revision
D38283: netlink: return optional metadata with the operation result.
Parents
rG08b0c98006b6: atomic: Fix the atomic_load_ptr() *SAN interceptor
Branches
Unknown
Tags
Unknown