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
b59b3e33
Commit
b59b3e33
authored
May 21, 2004
by
Hideaki Yoshifuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6] unify csum_ipv6_magic() code path for rawv6 sockets.
parent
3280a252
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
net/ipv6/raw.c
net/ipv6/raw.c
+9
-10
No files found.
net/ipv6/raw.c
View file @
b59b3e33
...
@@ -452,6 +452,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r
...
@@ -452,6 +452,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
int
err
=
0
;
int
err
=
0
;
u16
*
csum
;
u16
*
csum
;
u32
tmp_csum
;
if
(
!
opt
->
checksum
)
if
(
!
opt
->
checksum
)
goto
send
;
goto
send
;
...
@@ -466,26 +467,24 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r
...
@@ -466,26 +467,24 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r
goto
out
;
goto
out
;
}
}
/* should be check HW csum miyazawa */
if
(
skb_queue_len
(
&
sk
->
sk_write_queue
)
==
1
)
{
if
(
skb_queue_len
(
&
sk
->
sk_write_queue
)
==
1
)
{
/*
/*
* Only one fragment on the socket.
* Only one fragment on the socket.
*/
*/
/* should be check HW csum miyazawa */
tmp_csum
=
skb
->
csum
;
*
csum
=
csum_ipv6_magic
(
&
fl
->
fl6_src
,
&
fl
->
fl6_dst
,
len
,
fl
->
proto
,
skb
->
csum
);
}
else
{
}
else
{
u32
tmp_csum
=
0
;
tmp_csum
=
0
;
skb_queue_walk
(
&
sk
->
sk_write_queue
,
skb
)
{
skb_queue_walk
(
&
sk
->
sk_write_queue
,
skb
)
{
tmp_csum
=
csum_add
(
tmp_csum
,
skb
->
csum
);
tmp_csum
=
csum_add
(
tmp_csum
,
skb
->
csum
);
}
}
tmp_csum
=
csum_ipv6_magic
(
&
fl
->
fl6_src
,
&
fl
->
fl6_dst
,
len
,
fl
->
proto
,
tmp_csum
);
*
csum
=
tmp_csum
;
}
}
*
csum
=
csum_ipv6_magic
(
&
fl
->
fl6_src
,
&
fl
->
fl6_dst
,
len
,
fl
->
proto
,
tmp_csum
);
if
(
*
csum
==
0
)
if
(
*
csum
==
0
)
*
csum
=
-
1
;
*
csum
=
-
1
;
send:
send:
...
...
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