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
1b003be3
Commit
1b003be3
authored
Jun 09, 2009
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sctp: Use frag list abstraction interfaces.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
5c313e9a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
net/sctp/input.c
net/sctp/input.c
+2
-2
net/sctp/socket.c
net/sctp/socket.c
+3
-3
net/sctp/ulpevent.c
net/sctp/ulpevent.c
+3
-4
No files found.
net/sctp/input.c
View file @
1b003be3
...
...
@@ -81,13 +81,13 @@ static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb);
/* Calculate the SCTP checksum of an SCTP packet. */
static
inline
int
sctp_rcv_checksum
(
struct
sk_buff
*
skb
)
{
struct
sk_buff
*
list
=
skb_shinfo
(
skb
)
->
frag_list
;
struct
sctphdr
*
sh
=
sctp_hdr
(
skb
);
__le32
cmp
=
sh
->
checksum
;
struct
sk_buff
*
list
;
__le32
val
;
__u32
tmp
=
sctp_start_cksum
((
__u8
*
)
sh
,
skb_headlen
(
skb
));
for
(;
list
;
list
=
list
->
nex
t
)
skb_walk_frags
(
skb
,
lis
t
)
tmp
=
sctp_update_cksum
((
__u8
*
)
list
->
data
,
skb_headlen
(
list
),
tmp
);
...
...
net/sctp/socket.c
View file @
1b003be3
...
...
@@ -1881,7 +1881,7 @@ static int sctp_skb_pull(struct sk_buff *skb, int len)
len
-=
skb_len
;
__skb_pull
(
skb
,
skb_len
);
for
(
list
=
skb_shinfo
(
skb
)
->
frag_list
;
list
;
list
=
list
->
nex
t
)
{
skb_walk_frags
(
skb
,
lis
t
)
{
rlen
=
sctp_skb_pull
(
list
,
len
);
skb
->
len
-=
(
len
-
rlen
);
skb
->
data_len
-=
(
len
-
rlen
);
...
...
@@ -6660,7 +6660,7 @@ static void sctp_sock_rfree_frag(struct sk_buff *skb)
goto
done
;
/* Don't forget the fragments. */
for
(
frag
=
skb_shinfo
(
skb
)
->
frag_list
;
frag
;
frag
=
frag
->
next
)
skb_walk_frags
(
skb
,
frag
)
sctp_sock_rfree_frag
(
frag
);
done:
...
...
@@ -6675,7 +6675,7 @@ static void sctp_skb_set_owner_r_frag(struct sk_buff *skb, struct sock *sk)
goto
done
;
/* Don't forget the fragments. */
for
(
frag
=
skb_shinfo
(
skb
)
->
frag_list
;
frag
;
frag
=
frag
->
next
)
skb_walk_frags
(
skb
,
frag
)
sctp_skb_set_owner_r_frag
(
frag
,
sk
);
done:
...
...
net/sctp/ulpevent.c
View file @
1b003be3
...
...
@@ -976,9 +976,8 @@ static void sctp_ulpevent_receive_data(struct sctp_ulpevent *event,
* In general, the skb passed from IP can have only 1 level of
* fragments. But we allow multiple levels of fragments.
*/
for
(
frag
=
skb_shinfo
(
skb
)
->
frag_list
;
frag
;
frag
=
frag
->
next
)
{
skb_walk_frags
(
skb
,
frag
)
sctp_ulpevent_receive_data
(
sctp_skb2event
(
frag
),
asoc
);
}
}
/* Do accounting for bytes just read by user and release the references to
...
...
@@ -1003,7 +1002,7 @@ static void sctp_ulpevent_release_data(struct sctp_ulpevent *event)
goto
done
;
/* Don't forget the fragments. */
for
(
frag
=
skb_shinfo
(
skb
)
->
frag_list
;
frag
;
frag
=
frag
->
next
)
{
skb_walk_frags
(
skb
,
frag
)
{
/* NOTE: skb_shinfos are recursive. Although IP returns
* skb's with only 1 level of fragments, SCTP reassembly can
* increase the levels.
...
...
@@ -1026,7 +1025,7 @@ static void sctp_ulpevent_release_frag_data(struct sctp_ulpevent *event)
goto
done
;
/* Don't forget the fragments. */
for
(
frag
=
skb_shinfo
(
skb
)
->
frag_list
;
frag
;
frag
=
frag
->
next
)
{
skb_walk_frags
(
skb
,
frag
)
{
/* NOTE: skb_shinfos are recursive. Although IP returns
* skb's with only 1 level of fragments, SCTP reassembly can
* increase the levels.
...
...
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