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
c7acc660
Commit
c7acc660
authored
Dec 28, 2004
by
Sridhar Samudrala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCTP] Fix misc. issues in SCTP_PEER_ADDR_PARAMS set socket option.
Signed-off-by:
Sridhar Samudrala
<
sri@us.ibm.com
>
parent
77aacb35
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
14 deletions
+10
-14
include/net/sctp/structs.h
include/net/sctp/structs.h
+0
-6
net/sctp/associola.c
net/sctp/associola.c
+1
-2
net/sctp/sm_sideeffect.c
net/sctp/sm_sideeffect.c
+1
-1
net/sctp/socket.c
net/sctp/socket.c
+8
-4
net/sctp/transport.c
net/sctp/transport.c
+0
-1
No files found.
include/net/sctp/structs.h
View file @
c7acc660
...
...
@@ -856,12 +856,6 @@ struct sctp_transport {
/* Error count : The current error count for this destination. */
unsigned
short
error_count
;
/* Error : Current error threshold for this destination
* Threshold : i.e. what value marks the destination down if
* : errorCount reaches this value.
*/
unsigned
short
error_threshold
;
/* This is the max_retrans value for the transport and will
* be initialized to proto.max_retrans.path. This can be changed
* using SCTP_SET_PEER_ADDR_PARAMS socket option.
...
...
net/sctp/associola.c
View file @
c7acc660
...
...
@@ -501,7 +501,6 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
peer
->
partial_bytes_acked
=
0
;
peer
->
flight_size
=
0
;
peer
->
error_threshold
=
peer
->
max_retrans
;
/* By default, enable heartbeat for peer address. */
peer
->
hb_allowed
=
1
;
...
...
@@ -512,7 +511,7 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
peer
->
hb_interval
=
msecs_to_jiffies
(
sp
->
paddrparam
.
spp_hbinterval
);
/* Set the path max_retrans. */
peer
->
max_retrans
=
asoc
->
max_retrans
;
peer
->
max_retrans
=
sp
->
paddrparam
.
spp_pathmaxrxt
;
/* Set the transport's RTO.initial value */
peer
->
rto
=
asoc
->
rto_initial
;
...
...
net/sctp/sm_sideeffect.c
View file @
c7acc660
...
...
@@ -415,7 +415,7 @@ static void sctp_do_8_2_transport_strike(struct sctp_association *asoc,
asoc
->
overall_error_count
++
;
if
(
transport
->
active
&&
(
transport
->
error_count
++
>=
transport
->
error_threshold
))
{
(
transport
->
error_count
++
>=
transport
->
max_retrans
))
{
SCTP_DEBUG_PRINTK
(
"transport_strike: transport "
"IP:%d.%d.%d.%d failed.
\n
"
,
NIPQUAD
(
transport
->
ipaddr
.
v4
.
sin_addr
));
...
...
net/sctp/socket.c
View file @
c7acc660
...
...
@@ -1711,10 +1711,13 @@ static int sctp_setsockopt_peer_addr_params(struct sock *sk,
/* update default value for endpoint (all future associations) */
if
(
!
params
.
spp_assoc_id
&&
sctp_is_any
((
union
sctp_addr
*
)
&
params
.
spp_address
))
{
if
(
params
.
spp_hbinterval
)
/* Manual heartbeat on an endpoint is invalid. */
if
(
0xffffffff
==
params
.
spp_hbinterval
)
return
-
EINVAL
;
else
if
(
params
.
spp_hbinterval
)
sctp_sk
(
sk
)
->
paddrparam
.
spp_hbinterval
=
params
.
spp_hbinterval
;
if
(
sctp_max_retrans_path
)
if
(
params
.
spp_pathmaxrxt
)
sctp_sk
(
sk
)
->
paddrparam
.
spp_pathmaxrxt
=
params
.
spp_pathmaxrxt
;
return
0
;
...
...
@@ -1756,7 +1759,8 @@ static int sctp_setsockopt_peer_addr_params(struct sock *sk,
/* spp_pathmaxrxt contains the maximum number of retransmissions
* before this address shall be considered unreachable.
*/
trans
->
error_threshold
=
params
.
spp_pathmaxrxt
;
if
(
params
.
spp_pathmaxrxt
)
trans
->
max_retrans
=
params
.
spp_pathmaxrxt
;
return
0
;
}
...
...
@@ -2935,7 +2939,7 @@ static int sctp_getsockopt_peer_addr_params(struct sock *sk, int len,
/* spp_pathmaxrxt contains the maximum number of retransmissions
* before this address shall be considered unreachable.
*/
params
.
spp_pathmaxrxt
=
trans
->
error_threshold
;
params
.
spp_pathmaxrxt
=
trans
->
max_retrans
;
done:
if
(
copy_to_user
(
optval
,
&
params
,
len
))
...
...
net/sctp/transport.c
View file @
c7acc660
...
...
@@ -88,7 +88,6 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
/* Initialize the default path max_retrans. */
peer
->
max_retrans
=
sctp_max_retrans_path
;
peer
->
error_threshold
=
0
;
peer
->
error_count
=
0
;
INIT_LIST_HEAD
(
&
peer
->
transmitted
);
...
...
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