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
cd171fbd
Commit
cd171fbd
authored
Oct 06, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ECONET]: Fix packet handler to be PKT_CAN_SHARE_SKB.
parent
2ef21770
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
net/econet/af_econet.c
net/econet/af_econet.c
+8
-9
No files found.
net/econet/af_econet.c
View file @
cd171fbd
...
...
@@ -1011,26 +1011,25 @@ static int __init aun_udp_initialise(void)
static
int
econet_rcv
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
,
struct
packet_type
*
pt
)
{
struct
ec_framehdr
*
hdr
=
(
struct
ec_framehdr
*
)
skb
->
data
;
struct
ec_framehdr
*
hdr
;
struct
sock
*
sk
;
struct
ec_device
*
edev
=
dev
->
ec_ptr
;
if
(
!
edev
)
{
if
(
!
edev
)
{
kfree_skb
(
skb
);
return
0
;
}
if
(
skb
->
len
<
sizeof
(
struct
ec_framehdr
))
{
if
(
!
pskb_may_pull
(
skb
,
sizeof
(
struct
ec_framehdr
)))
{
/* Frame is too small to be any use */
kfree_skb
(
skb
);
return
0
;
}
hdr
=
(
struct
ec_framehdr
*
)
skb
->
data
;
/* First check for encapsulated IP */
if
(
hdr
->
port
==
EC_PORT_IP
)
{
if
(
hdr
->
port
==
EC_PORT_IP
)
{
skb
->
protocol
=
htons
(
ETH_P_IP
);
skb_pull
(
skb
,
sizeof
(
struct
ec_framehdr
));
netif_rx
(
skb
);
...
...
@@ -1038,8 +1037,7 @@ static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet
}
sk
=
ec_listening_socket
(
hdr
->
port
,
hdr
->
src_stn
,
hdr
->
src_net
);
if
(
!
sk
)
{
if
(
!
sk
)
{
kfree_skb
(
skb
);
return
0
;
}
...
...
@@ -1051,6 +1049,7 @@ static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet
static
struct
packet_type
econet_packet_type
=
{
.
type
=
__constant_htons
(
ETH_P_ECONET
),
.
func
=
econet_rcv
,
.
data
=
PKT_CAN_SHARE_SKB
,
};
static
void
econet_hw_initialise
(
void
)
...
...
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