aboutsummaryrefslogtreecommitdiff
path: root/sys/netlink/route/iface.c
diff options
context:
space:
mode:
authorMuhammad Saheed <saheed@FreeBSD.org>2025-08-23 19:09:35 +0000
committerAymeric Wibo <obiwac@FreeBSD.org>2025-08-23 19:11:42 +0000
commitf13a042a5711310c0b240338c7bd8d6b58f05478 (patch)
tree50b023adb969e199ebffd3abf9841f50791edfed /sys/netlink/route/iface.c
parent3068d706eabe99f930fb01d3cbfd74ff1f0eb5a2 (diff)
netlink/route: Support modifying IFLA_ADDRESS with RTM_NEWLINKHEADmain
Allows setting link-layer address (MAC) by specifying the IFLA_ADDRESS attribute on RTM_NEWLINK requests. Reviewed by: melifaro, obiwac, mckusick (mentor) Approved by: melifaro, obiwac, mckusick (mentor) Sponsored by: Google LLC (GSoC) Differential Revision: https://reviews.freebsd.org/D51922
Diffstat (limited to 'sys/netlink/route/iface.c')
-rw-r--r--sys/netlink/route/iface.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c
index 8b871576d0b2..9beb80792af4 100644
--- a/sys/netlink/route/iface.c
+++ b/sys/netlink/route/iface.c
@@ -403,6 +403,7 @@ static const struct nlattr_parser nla_p_linfo[] = {
NL_DECLARE_ATTR_PARSER(linfo_parser, nla_p_linfo);
static const struct nlattr_parser nla_p_if[] = {
+ { .type = IFLA_ADDRESS, .off = _OUT(ifla_address), .cb = nlattr_get_nla },
{ .type = IFLA_IFNAME, .off = _OUT(ifla_ifname), .cb = nlattr_get_string },
{ .type = IFLA_MTU, .off = _OUT(ifla_mtu), .cb = nlattr_get_uint32 },
{ .type = IFLA_LINK, .off = _OUT(ifla_link), .cb = nlattr_get_uint32 },