Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
152375ff
Commit
152375ff
authored
May 13, 2003
by
Andrew Morton
Committed by
David S. Miller
May 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: netif_receive_skb() warning fix.
parent
171c62d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
17 deletions
+21
-17
net/core/dev.c
net/core/dev.c
+21
-17
No files found.
net/core/dev.c
View file @
152375ff
...
...
@@ -1482,15 +1482,29 @@ static __inline__ int handle_bridge(struct sk_buff *skb,
#endif
#ifdef CONFIG_NET_DIVERT
static
inline
int
handle_diverter
(
struct
sk_buff
*
skb
)
static
inline
void
handle_diverter
(
struct
sk_buff
*
skb
)
{
#ifdef CONFIG_NET_DIVERT
/* if diversion is supported on device, then divert */
if
(
skb
->
dev
->
divert
&&
skb
->
dev
->
divert
->
divert
)
divert_frame
(
skb
);
#endif
}
static
inline
int
__handle_bridge
(
struct
sk_buff
*
skb
,
struct
packet_type
**
pt_prev
,
int
*
ret
)
{
#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
if
(
skb
->
dev
->
br_port
)
{
*
ret
=
handle_bridge
(
skb
,
*
pt_prev
);
if
(
br_handle_frame_hook
(
skb
)
==
0
)
return
1
;
*
pt_prev
=
NULL
;
}
#endif
return
0
;
}
#endif
/* CONFIG_NET_DIVERT */
int
netif_receive_skb
(
struct
sk_buff
*
skb
)
{
...
...
@@ -1532,20 +1546,10 @@ int netif_receive_skb(struct sk_buff *skb)
}
}
#ifdef CONFIG_NET_DIVERT
if
(
skb
->
dev
->
divert
&&
skb
->
dev
->
divert
->
divert
)
ret
=
handle_diverter
(
skb
);
#endif
/* CONFIG_NET_DIVERT */
handle_diverter
(
skb
);
#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
if
(
skb
->
dev
->
br_port
)
{
ret
=
handle_bridge
(
skb
,
pt_prev
);
if
(
br_handle_frame_hook
(
skb
)
==
0
)
goto
out
;
pt_prev
=
NULL
;
}
#endif
if
(
__handle_bridge
(
skb
,
&
pt_prev
,
&
ret
))
goto
out
;
list_for_each_entry_rcu
(
ptype
,
&
ptype_base
[
ntohs
(
type
)
&
15
],
list
)
{
if
(
ptype
->
type
==
type
&&
...
...
@@ -1578,7 +1582,7 @@ int netif_receive_skb(struct sk_buff *skb)
ret
=
NET_RX_DROP
;
}
out:
out:
rcu_read_unlock
();
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
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