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
664bf802
Commit
664bf802
authored
Nov 07, 2002
by
Sridhar Samudrala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCTP] Fix for sideeffect violation in sctp_sf_heartbeat().
parent
d9a91e70
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
include/net/sctp/command.h
include/net/sctp/command.h
+1
-0
net/sctp/sm_sideeffect.c
net/sctp/sm_sideeffect.c
+5
-0
net/sctp/sm_statefuns.c
net/sctp/sm_statefuns.c
+6
-5
No files found.
include/net/sctp/command.h
View file @
664bf802
...
@@ -85,6 +85,7 @@ typedef enum {
...
@@ -85,6 +85,7 @@ typedef enum {
SCTP_CMD_UPDATE_ASSOC
,
/* Update association information. */
SCTP_CMD_UPDATE_ASSOC
,
/* Update association information. */
SCTP_CMD_PURGE_OUTQUEUE
,
/* Purge all data waiting to be sent. */
SCTP_CMD_PURGE_OUTQUEUE
,
/* Purge all data waiting to be sent. */
SCTP_CMD_SETUP_T2
,
/* Hi-level, setup T2-shutdown parms. */
SCTP_CMD_SETUP_T2
,
/* Hi-level, setup T2-shutdown parms. */
SCTP_CMD_RTO_PENDING
,
/* Set transport's rto_pending. */
SCTP_CMD_LAST
SCTP_CMD_LAST
}
sctp_verb_t
;
}
sctp_verb_t
;
...
...
net/sctp/sm_sideeffect.c
View file @
664bf802
...
@@ -595,6 +595,11 @@ int sctp_cmd_interpreter(sctp_event_t event_type, sctp_subtype_t subtype,
...
@@ -595,6 +595,11 @@ int sctp_cmd_interpreter(sctp_event_t event_type, sctp_subtype_t subtype,
chunk
->
pdiscard
=
1
;
chunk
->
pdiscard
=
1
;
break
;
break
;
case
SCTP_CMD_RTO_PENDING
:
t
=
command
->
obj
.
transport
;
t
->
rto_pending
=
1
;
break
;
default:
default:
printk
(
KERN_WARNING
"Impossible command: %u, %p
\n
"
,
printk
(
KERN_WARNING
"Impossible command: %u, %p
\n
"
,
command
->
verb
,
command
->
obj
.
ptr
);
command
->
verb
,
command
->
obj
.
ptr
);
...
...
net/sctp/sm_statefuns.c
View file @
664bf802
...
@@ -680,17 +680,18 @@ sctp_disposition_t sctp_sf_heartbeat(const sctp_endpoint_t *ep,
...
@@ -680,17 +680,18 @@ sctp_disposition_t sctp_sf_heartbeat(const sctp_endpoint_t *ep,
hbinfo
.
daddr
=
transport
->
ipaddr
;
hbinfo
.
daddr
=
transport
->
ipaddr
;
hbinfo
.
sent_at
=
jiffies
;
hbinfo
.
sent_at
=
jiffies
;
/* Set rto_pending indicating that an RTT measurement
* is started with this heartbeat chunk.
*/
transport
->
rto_pending
=
1
;
/* Send a heartbeat to our peer. */
/* Send a heartbeat to our peer. */
paylen
=
sizeof
(
sctp_sender_hb_info_t
);
paylen
=
sizeof
(
sctp_sender_hb_info_t
);
reply
=
sctp_make_heartbeat
(
asoc
,
transport
,
&
hbinfo
,
paylen
);
reply
=
sctp_make_heartbeat
(
asoc
,
transport
,
&
hbinfo
,
paylen
);
if
(
!
reply
)
if
(
!
reply
)
return
SCTP_DISPOSITION_NOMEM
;
return
SCTP_DISPOSITION_NOMEM
;
/* Set rto_pending indicating that an RTT measurement
* is started with this heartbeat chunk.
*/
sctp_add_cmd_sf
(
commands
,
SCTP_CMD_RTO_PENDING
,
SCTP_TRANSPORT
(
transport
));
sctp_add_cmd_sf
(
commands
,
SCTP_CMD_REPLY
,
SCTP_CHUNK
(
reply
));
sctp_add_cmd_sf
(
commands
,
SCTP_CMD_REPLY
,
SCTP_CHUNK
(
reply
));
return
SCTP_DISPOSITION_CONSUME
;
return
SCTP_DISPOSITION_CONSUME
;
}
}
...
...
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