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
Kirill Smelkov
linux
Commits
bb520e84
Commit
bb520e84
authored
Jun 18, 2003
by
Jon Grimm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCTP] Minor warning cleanups.
parent
cb2badbd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
16 deletions
+18
-16
include/net/sctp/structs.h
include/net/sctp/structs.h
+2
-2
net/sctp/associola.c
net/sctp/associola.c
+2
-2
net/sctp/outqueue.c
net/sctp/outqueue.c
+1
-1
net/sctp/sm_make_chunk.c
net/sctp/sm_make_chunk.c
+4
-4
net/sctp/sm_statefuns.c
net/sctp/sm_statefuns.c
+9
-7
No files found.
include/net/sctp/structs.h
View file @
bb520e84
...
@@ -1706,8 +1706,8 @@ __u32 sctp_association_get_next_tsn(struct sctp_association *);
...
@@ -1706,8 +1706,8 @@ __u32 sctp_association_get_next_tsn(struct sctp_association *);
__u32
sctp_association_get_tsn_block
(
struct
sctp_association
*
,
int
);
__u32
sctp_association_get_tsn_block
(
struct
sctp_association
*
,
int
);
void
sctp_assoc_sync_pmtu
(
struct
sctp_association
*
);
void
sctp_assoc_sync_pmtu
(
struct
sctp_association
*
);
void
sctp_assoc_rwnd_increase
(
struct
sctp_association
*
,
int
);
void
sctp_assoc_rwnd_increase
(
struct
sctp_association
*
,
unsigned
);
void
sctp_assoc_rwnd_decrease
(
struct
sctp_association
*
,
int
);
void
sctp_assoc_rwnd_decrease
(
struct
sctp_association
*
,
unsigned
);
void
sctp_assoc_set_primary
(
struct
sctp_association
*
,
void
sctp_assoc_set_primary
(
struct
sctp_association
*
,
struct
sctp_transport
*
);
struct
sctp_transport
*
);
int
sctp_assoc_set_bind_addr_from_ep
(
struct
sctp_association
*
,
int
);
int
sctp_assoc_set_bind_addr_from_ep
(
struct
sctp_association
*
,
int
);
...
...
net/sctp/associola.c
View file @
bb520e84
...
@@ -1061,7 +1061,7 @@ static inline int sctp_peer_needs_update(struct sctp_association *asoc)
...
@@ -1061,7 +1061,7 @@ static inline int sctp_peer_needs_update(struct sctp_association *asoc)
}
}
/* Increase asoc's rwnd by len and send any window update SACK if needed. */
/* Increase asoc's rwnd by len and send any window update SACK if needed. */
void
sctp_assoc_rwnd_increase
(
struct
sctp_association
*
asoc
,
int
len
)
void
sctp_assoc_rwnd_increase
(
struct
sctp_association
*
asoc
,
unsigned
len
)
{
{
struct
sctp_chunk
*
sack
;
struct
sctp_chunk
*
sack
;
struct
timer_list
*
timer
;
struct
timer_list
*
timer
;
...
@@ -1107,7 +1107,7 @@ void sctp_assoc_rwnd_increase(struct sctp_association *asoc, int len)
...
@@ -1107,7 +1107,7 @@ void sctp_assoc_rwnd_increase(struct sctp_association *asoc, int len)
}
}
/* Decrease asoc's rwnd by len. */
/* Decrease asoc's rwnd by len. */
void
sctp_assoc_rwnd_decrease
(
struct
sctp_association
*
asoc
,
int
len
)
void
sctp_assoc_rwnd_decrease
(
struct
sctp_association
*
asoc
,
unsigned
len
)
{
{
SCTP_ASSERT
(
asoc
->
rwnd
,
"rwnd zero"
,
return
);
SCTP_ASSERT
(
asoc
->
rwnd
,
"rwnd zero"
,
return
);
SCTP_ASSERT
(
!
asoc
->
rwnd_over
,
"rwnd_over not zero"
,
return
);
SCTP_ASSERT
(
!
asoc
->
rwnd_over
,
"rwnd_over not zero"
,
return
);
...
...
net/sctp/outqueue.c
View file @
bb520e84
...
@@ -1012,7 +1012,7 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack)
...
@@ -1012,7 +1012,7 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack)
__u32
sack_ctsn
,
ctsn
,
tsn
;
__u32
sack_ctsn
,
ctsn
,
tsn
;
__u32
highest_tsn
,
highest_new_tsn
;
__u32
highest_tsn
,
highest_new_tsn
;
__u32
sack_a_rwnd
;
__u32
sack_a_rwnd
;
int
outstanding
;
unsigned
outstanding
;
struct
sctp_transport
*
primary
=
asoc
->
peer
.
primary_path
;
struct
sctp_transport
*
primary
=
asoc
->
peer
.
primary_path
;
int
count_of_newacks
=
0
;
int
count_of_newacks
=
0
;
...
...
net/sctp/sm_make_chunk.c
View file @
bb520e84
...
@@ -1356,7 +1356,7 @@ struct sctp_association *sctp_unpack_cookie(
...
@@ -1356,7 +1356,7 @@ struct sctp_association *sctp_unpack_cookie(
int
headersize
,
bodysize
,
fixed_size
;
int
headersize
,
bodysize
,
fixed_size
;
__u8
digest
[
SCTP_SIGNATURE_SIZE
];
__u8
digest
[
SCTP_SIGNATURE_SIZE
];
struct
scatterlist
sg
;
struct
scatterlist
sg
;
unsigned
int
keylen
;
unsigned
int
keylen
,
len
;
char
*
key
;
char
*
key
;
sctp_scope_t
scope
;
sctp_scope_t
scope
;
struct
sk_buff
*
skb
=
chunk
->
skb
;
struct
sk_buff
*
skb
=
chunk
->
skb
;
...
@@ -1369,8 +1369,8 @@ struct sctp_association *sctp_unpack_cookie(
...
@@ -1369,8 +1369,8 @@ struct sctp_association *sctp_unpack_cookie(
* There must be enough room for our cookie and our peer's
* There must be enough room for our cookie and our peer's
* INIT chunk.
* INIT chunk.
*/
*/
if
(
ntohs
(
chunk
->
chunk_hdr
->
length
)
<
len
=
ntohs
(
chunk
->
chunk_hdr
->
length
);
(
fixed_size
+
sizeof
(
sctp_chunkhdr_t
)
))
if
(
len
<
fixed_size
+
sizeof
(
struct
sctp_chunkhdr
))
goto
malformed
;
goto
malformed
;
/* Verify that the cookie has been padded out. */
/* Verify that the cookie has been padded out. */
...
@@ -1454,7 +1454,7 @@ struct sctp_association *sctp_unpack_cookie(
...
@@ -1454,7 +1454,7 @@ struct sctp_association *sctp_unpack_cookie(
retval
->
peer
.
port
=
ntohs
(
chunk
->
sctp_hdr
->
source
);
retval
->
peer
.
port
=
ntohs
(
chunk
->
sctp_hdr
->
source
);
/* Populate the association from the cookie. */
/* Populate the association from the cookie. */
retval
->
c
=
*
bear_cookie
;
memcpy
(
&
retval
->
c
,
bear_cookie
,
sizeof
(
*
bear_cookie
))
;
if
(
sctp_assoc_set_bind_addr_from_cookie
(
retval
,
bear_cookie
,
if
(
sctp_assoc_set_bind_addr_from_cookie
(
retval
,
bear_cookie
,
GFP_ATOMIC
)
<
0
)
{
GFP_ATOMIC
)
<
0
)
{
...
...
net/sctp/sm_statefuns.c
View file @
bb520e84
...
@@ -1948,22 +1948,23 @@ sctp_disposition_t sctp_sf_do_9_1_abort(const struct sctp_endpoint *ep,
...
@@ -1948,22 +1948,23 @@ sctp_disposition_t sctp_sf_do_9_1_abort(const struct sctp_endpoint *ep,
sctp_cmd_seq_t
*
commands
)
sctp_cmd_seq_t
*
commands
)
{
{
struct
sctp_chunk
*
chunk
=
arg
;
struct
sctp_chunk
*
chunk
=
arg
;
unsigned
len
;
__u16
error
=
SCTP_ERROR_NO_ERROR
;
__u16
error
=
SCTP_ERROR_NO_ERROR
;
if
(
!
sctp_vtag_verify_either
(
chunk
,
asoc
))
if
(
!
sctp_vtag_verify_either
(
chunk
,
asoc
))
return
sctp_sf_pdiscard
(
ep
,
asoc
,
type
,
arg
,
commands
);
return
sctp_sf_pdiscard
(
ep
,
asoc
,
type
,
arg
,
commands
);
if
(
chunk
&&
(
ntohs
(
chunk
->
chunk_hdr
->
length
)
>=
/* Check that chunk header looks valid. */
(
sizeof
(
struct
sctp_chunkhdr
)
+
len
=
ntohs
(
chunk
->
chunk_hdr
->
length
);
sizeof
(
struct
sctp_errhdr
))
))
if
(
len
>=
sizeof
(
struct
sctp_chunkhdr
)
+
sizeof
(
struct
sctp_errhdr
))
error
=
((
sctp_errhdr_t
*
)
chunk
->
skb
->
data
)
->
cause
;
error
=
((
sctp_errhdr_t
*
)
chunk
->
skb
->
data
)
->
cause
;
/* ASSOC_FAILED will DELETE_TCB. */
/* ASSOC_FAILED will DELETE_TCB. */
sctp_add_cmd_sf
(
commands
,
SCTP_CMD_ASSOC_FAILED
,
SCTP_U32
(
error
));
sctp_add_cmd_sf
(
commands
,
SCTP_CMD_ASSOC_FAILED
,
SCTP_U32
(
error
));
SCTP_INC_STATS
(
SctpAborteds
);
SCTP_INC_STATS
(
SctpAborteds
);
SCTP_DEC_STATS
(
SctpCurrEstab
);
SCTP_DEC_STATS
(
SctpCurrEstab
);
/* BUG? This does not look complete... */
return
SCTP_DISPOSITION_ABORT
;
return
SCTP_DISPOSITION_ABORT
;
}
}
...
@@ -1979,6 +1980,7 @@ sctp_disposition_t sctp_sf_cookie_wait_abort(const struct sctp_endpoint *ep,
...
@@ -1979,6 +1980,7 @@ sctp_disposition_t sctp_sf_cookie_wait_abort(const struct sctp_endpoint *ep,
sctp_cmd_seq_t
*
commands
)
sctp_cmd_seq_t
*
commands
)
{
{
struct
sctp_chunk
*
chunk
=
arg
;
struct
sctp_chunk
*
chunk
=
arg
;
unsigned
len
;
__u16
error
=
SCTP_ERROR_NO_ERROR
;
__u16
error
=
SCTP_ERROR_NO_ERROR
;
if
(
!
sctp_vtag_verify_either
(
chunk
,
asoc
))
if
(
!
sctp_vtag_verify_either
(
chunk
,
asoc
))
...
@@ -1990,9 +1992,9 @@ sctp_disposition_t sctp_sf_cookie_wait_abort(const struct sctp_endpoint *ep,
...
@@ -1990,9 +1992,9 @@ sctp_disposition_t sctp_sf_cookie_wait_abort(const struct sctp_endpoint *ep,
sctp_add_cmd_sf
(
commands
,
SCTP_CMD_TIMER_STOP
,
sctp_add_cmd_sf
(
commands
,
SCTP_CMD_TIMER_STOP
,
SCTP_TO
(
SCTP_EVENT_TIMEOUT_T1_INIT
));
SCTP_TO
(
SCTP_EVENT_TIMEOUT_T1_INIT
));
if
(
chunk
&&
(
ntohs
(
chunk
->
chunk_hdr
->
length
)
>=
/* Check that chunk header looks valid. */
(
sizeof
(
struct
sctp_chunkhdr
)
+
len
=
ntohs
(
chunk
->
chunk_hdr
->
length
);
sizeof
(
struct
sctp_errhdr
))
))
if
(
len
>=
sizeof
(
struct
sctp_chunkhdr
)
+
sizeof
(
struct
sctp_errhdr
))
error
=
((
sctp_errhdr_t
*
)
chunk
->
skb
->
data
)
->
cause
;
error
=
((
sctp_errhdr_t
*
)
chunk
->
skb
->
data
)
->
cause
;
/* CMD_INIT_FAILED will DELETE_TCB. */
/* CMD_INIT_FAILED will DELETE_TCB. */
...
...
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