Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
HardenedBSD
HardenedBSD
Commits
db5a36bd
Commit
db5a36bd
authored
May 22, 2018
by
Mark Johnston
Browse files
Simplify lagg_input().
No functional change intended. MFC after: 2 weeks
parent
ee252fc9
Changes
2
Hide whitespace changes
Inline
Side-by-side
sys/net/if_lagg.c
View file @
db5a36bd
...
...
@@ -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
();
...
...
sys/net/if_lagg.h
View file @
db5a36bd
...
...
@@ -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
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment