mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
if_attach should not sleep; change malloc's M_WAITOK to M_NOWAIT
This commit is contained in:
parent
d4cd548bb1
commit
10ed96fd9c
1 changed files with 1 additions and 1 deletions
|
|
@ -423,7 +423,7 @@ if_attach(ifp)
|
|||
socksize = sizeof(*sdl);
|
||||
socksize = ROUNDUP(socksize);
|
||||
ifasize = sizeof(*ifa) + 2 * socksize;
|
||||
ifa = (struct ifaddr *)malloc(ifasize, M_IFADDR, M_WAITOK | M_ZERO);
|
||||
ifa = (struct ifaddr *)malloc(ifasize, M_IFADDR, M_NOWAIT | M_ZERO);
|
||||
if (ifa) {
|
||||
sdl = (struct sockaddr_dl *)(ifa + 1);
|
||||
sdl->sdl_len = socksize;
|
||||
|
|
|
|||
Loading…
Reference in a new issue