Commit db5a36bd authored by Mark Johnston's avatar Mark Johnston
Browse files

Simplify lagg_input().

No functional change intended.

MFC after:	2 weeks
parent ee252fc9
......@@ -1680,7 +1680,7 @@ lagg_input(struct ifnet *ifp, struct mbuf *m)
LAGG_RLOCK();
if ((scifp->if_drv_flags & IFF_DRV_RUNNING) == 0 ||
(lp->lp_flags & LAGG_PORT_DISABLED) ||
lp->lp_detaching != 0 ||
sc->sc_proto == LAGG_PROTO_NONE) {
LAGG_RUNLOCK();
m_freem(m);
......@@ -1689,17 +1689,10 @@ lagg_input(struct ifnet *ifp, struct mbuf *m)
ETHER_BPF_MTAP(scifp, m);
if (lp->lp_detaching != 0) {
m = lagg_proto_input(sc, lp, m);
if (m != NULL && (scifp->if_flags & IFF_MONITOR) != 0) {
m_freem(m);
m = NULL;
} else
m = lagg_proto_input(sc, lp, m);
if (m != NULL) {
if (scifp->if_flags & IFF_MONITOR) {
m_freem(m);
m = NULL;
}
}
LAGG_RUNLOCK();
......
......@@ -42,9 +42,8 @@
#define LAGG_PORT_ACTIVE 0x00000004 /* port is active */
#define LAGG_PORT_COLLECTING 0x00000008 /* port is receiving frames */
#define LAGG_PORT_DISTRIBUTING 0x00000010 /* port is sending frames */
#define LAGG_PORT_DISABLED 0x00000020 /* port is disabled */
#define LAGG_PORT_BITS "\20\01MASTER\02STACK\03ACTIVE\04COLLECTING" \
"\05DISTRIBUTING\06DISABLED"
"\05DISTRIBUTING"
/* Supported lagg PROTOs */
typedef enum {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment