ifnet: Use if_link_state snapshot to invoke ifnet_link_event
So that everyone in this task have consistent view of link state. Reviewed by: ae MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8214
This commit is contained in:
parent
2a059700b6
commit
368bf0c2c6
@ -2206,7 +2206,7 @@ do_link_state_change(void *arg, int pending)
|
||||
if (log_link_state_change)
|
||||
log(LOG_NOTICE, "%s: link state changed to %s\n", ifp->if_xname,
|
||||
(link_state == LINK_STATE_UP) ? "UP" : "DOWN" );
|
||||
EVENTHANDLER_INVOKE(ifnet_link_event, ifp, ifp->if_link_state);
|
||||
EVENTHANDLER_INVOKE(ifnet_link_event, ifp, link_state);
|
||||
CURVNET_RESTORE();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user