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
e418a672
Commit
e418a672
authored
May 02, 2004
by
Sridhar Samudrala
Committed by
Sridhar Samudrala
May 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCTP] Fix bugs in handling overlapping INIT and peer restart over a
multihomed association.
parent
d3476cc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
net/sctp/associola.c
net/sctp/associola.c
+19
-9
No files found.
net/sctp/associola.c
View file @
e418a672
...
...
@@ -936,6 +936,9 @@ void sctp_assoc_migrate(struct sctp_association *assoc, struct sock *newsk)
void
sctp_assoc_update
(
struct
sctp_association
*
asoc
,
struct
sctp_association
*
new
)
{
struct
sctp_transport
*
trans
;
struct
list_head
*
pos
,
*
temp
;
/* Copy in new parameters of peer. */
asoc
->
c
=
new
->
c
;
asoc
->
peer
.
rwnd
=
new
->
peer
.
rwnd
;
...
...
@@ -944,20 +947,19 @@ void sctp_assoc_update(struct sctp_association *asoc,
sctp_tsnmap_init
(
&
asoc
->
peer
.
tsn_map
,
SCTP_TSN_MAP_SIZE
,
asoc
->
peer
.
i
.
initial_tsn
);
/*
FIXME:
* Do we need to copy primary_path etc?
*
* More explicitly, addresses may have been removed and
* this needs accounting for.
*/
/*
Remove any peer addresses not present in the new association. */
list_for_each_safe
(
pos
,
temp
,
&
asoc
->
peer
.
transport_addr_list
)
{
trans
=
list_entry
(
pos
,
struct
sctp_transport
,
transports
);
if
(
!
sctp_assoc_lookup_paddr
(
new
,
&
trans
->
ipaddr
))
sctp_assoc_del_peer
(
asoc
,
&
trans
->
ipaddr
);
}
/* If the case is A (association restart), use
* initial_tsn as next_tsn. If the case is B, use
* current next_tsn in case data sent to peer
* has been discarded and needs retransmission.
*/
if
(
sctp_state
(
asoc
,
ESTABLISHED
))
{
if
(
asoc
->
state
>=
SCTP_STATE_ESTABLISHED
)
{
asoc
->
next_tsn
=
new
->
next_tsn
;
asoc
->
ctsn_ack_point
=
new
->
ctsn_ack_point
;
asoc
->
adv_peer_ack_point
=
new
->
adv_peer_ack_point
;
...
...
@@ -968,6 +970,15 @@ void sctp_assoc_update(struct sctp_association *asoc,
sctp_ssnmap_clear
(
asoc
->
ssnmap
);
}
else
{
/* Add any peer addresses from the new association. */
list_for_each
(
pos
,
&
new
->
peer
.
transport_addr_list
)
{
trans
=
list_entry
(
pos
,
struct
sctp_transport
,
transports
);
if
(
!
sctp_assoc_lookup_paddr
(
asoc
,
&
trans
->
ipaddr
))
sctp_assoc_add_peer
(
asoc
,
&
trans
->
ipaddr
,
GFP_ATOMIC
);
}
asoc
->
ctsn_ack_point
=
asoc
->
next_tsn
-
1
;
asoc
->
adv_peer_ack_point
=
asoc
->
ctsn_ack_point
;
if
(
!
asoc
->
ssnmap
)
{
...
...
@@ -976,7 +987,6 @@ void sctp_assoc_update(struct sctp_association *asoc,
new
->
ssnmap
=
NULL
;
}
}
}
/* Update the retran path for sending a retransmitted packet.
...
...
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