diff options
author | Renato Botelho <renato@netgate.com> | 2016-01-15 08:36:46 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-01-15 08:36:46 -0200 |
commit | 5118afa75776a41209a94f4a4ddf7c3164fac0df (patch) | |
tree | a899f605d0f0d9be1fb44d7a8d643a1233065dda /sys/net/if_lagg.c | |
parent | 58b7eab7d39d983cc70f6f1d611f00470a76fca1 (diff) | |
parent | ce58d6dbf38815b68dedcf0559779e5ceb149a0d (diff) | |
download | FreeBSD-src-5118afa75776a41209a94f4a4ddf7c3164fac0df.zip FreeBSD-src-5118afa75776a41209a94f4a4ddf7c3164fac0df.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/net/if_lagg.c')
-rw-r--r-- | sys/net/if_lagg.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index 2522fb6..9449df0 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -1062,9 +1062,25 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) /* Set to LAGG_PROTO_NONE during the attach. */ LAGG_WLOCK(sc); if (sc->sc_proto != LAGG_PROTO_NONE) { + int (*sc_detach)(struct lagg_softc *sc); + + /* Reset protocol and pointers */ sc->sc_proto = LAGG_PROTO_NONE; - if (sc->sc_detach != NULL) - sc->sc_detach(sc); + sc_detach = sc->sc_detach; + sc->sc_detach = NULL; + sc->sc_start = NULL; + sc->sc_input = NULL; + sc->sc_port_create = NULL; + sc->sc_port_destroy = NULL; + sc->sc_linkstate = NULL; + sc->sc_init = NULL; + sc->sc_stop = NULL; + sc->sc_lladdr = NULL; + sc->sc_req = NULL; + sc->sc_portreq = NULL; + + if (sc_detach != NULL) + sc_detach(sc); else LAGG_WUNLOCK(sc); } else |