netlink: fix if_allocdescr() malloc options argument.

The current value was based on the initial revision of D37566 and
 was not updated afterwards.

MFC after:	1 day
This commit is contained in:
Alexander V. Chernikov 2023-02-17 17:35:28 +00:00
parent f2f7911c55
commit 6694cb1f57

View File

@ -72,7 +72,7 @@ modify_generic(struct ifnet *ifp, struct nl_parsed_link *lattrs,
if (lattrs->ifla_ifalias != NULL) {
if (nlp_has_priv(nlp, PRIV_NET_SETIFDESCR)) {
int len = strlen(lattrs->ifla_ifalias) + 1;
char *buf = if_allocdescr(len, true);
char *buf = if_allocdescr(len, M_WAITOK);
memcpy(buf, lattrs->ifla_ifalias, len);
if_setdescr(ifp, buf);