Don't use if_maddr_rlock() in ng_ether(4), use epoch(9) directly instead.
This commit is contained in:
parent
fb3fc771f6
commit
57985d11b4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353421
@ -578,6 +578,7 @@ ng_ether_rcvmsg(node_p node, item_p item, hook_p lasthook)
|
||||
case NGM_ETHER_ADD_MULTI:
|
||||
{
|
||||
struct sockaddr_dl sa_dl;
|
||||
struct epoch_tracker et;
|
||||
struct ifmultiaddr *ifma;
|
||||
|
||||
if (msg->header.arglen != ETHER_ADDR_LEN) {
|
||||
@ -597,10 +598,10 @@ ng_ether_rcvmsg(node_p node, item_p item, hook_p lasthook)
|
||||
* lose a race while we check if the membership
|
||||
* already exists.
|
||||
*/
|
||||
if_maddr_rlock(priv->ifp);
|
||||
NET_EPOCH_ENTER(et);
|
||||
ifma = if_findmulti(priv->ifp,
|
||||
(struct sockaddr *)&sa_dl);
|
||||
if_maddr_runlock(priv->ifp);
|
||||
NET_EPOCH_EXIT(et);
|
||||
if (ifma != NULL) {
|
||||
error = EADDRINUSE;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user