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
507d37cf
Commit
507d37cf
authored
Sep 09, 2005
by
Arnaldo Carvalho de Melo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CCID] Only call the HC insert_options methods when requested
Signed-off-by:
Arnaldo Carvalho de Melo
<
acme@mandriva.com
>
parent
0ba7a3ba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
include/linux/dccp.h
include/linux/dccp.h
+2
-0
net/dccp/ccids/ccid3.c
net/dccp/ccids/ccid3.c
+4
-1
net/dccp/options.c
net/dccp/options.c
+8
-3
No files found.
include/linux/dccp.h
View file @
507d37cf
...
...
@@ -433,6 +433,8 @@ struct dccp_sock {
struct
ccid
*
dccps_hc_tx_ccid
;
struct
dccp_options_received
dccps_options_received
;
enum
dccp_role
dccps_role
:
2
;
__u8
dccps_hc_rx_insert_options
:
1
;
__u8
dccps_hc_tx_insert_options
:
1
;
};
static
inline
struct
dccp_sock
*
dccp_sk
(
const
struct
sock
*
sk
)
...
...
net/dccp/ccids/ccid3.c
View file @
507d37cf
...
...
@@ -358,10 +358,12 @@ static int ccid3_hc_tx_send_packet(struct sock *sk,
}
/* Can we send? if so add options and add to packet history */
if
(
rc
==
0
)
if
(
rc
==
0
)
{
dp
->
dccps_hc_tx_insert_options
=
1
;
new_packet
->
dccphtx_ccval
=
DCCP_SKB_CB
(
skb
)
->
dccpd_ccval
=
hctx
->
ccid3hctx_last_win_count
;
}
out:
return
rc
;
}
...
...
@@ -811,6 +813,7 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk)
hcrx
->
ccid3hcrx_pinv
=
~
0
;
else
hcrx
->
ccid3hcrx_pinv
=
1000000
/
hcrx
->
ccid3hcrx_p
;
dp
->
dccps_hc_rx_insert_options
=
1
;
dccp_send_ack
(
sk
);
}
...
...
net/dccp/options.c
View file @
507d37cf
...
...
@@ -505,13 +505,18 @@ void dccp_insert_options(struct sock *sk, struct sk_buff *skb)
(
dp
->
dccps_hc_rx_ackpkts
->
dccpap_buf_ackno
!=
DCCP_MAX_SEQNO
+
1
))
dccp_insert_option_ack_vector
(
sk
,
skb
);
if
(
dp
->
dccps_timestamp_echo
!=
0
)
dccp_insert_option_timestamp_echo
(
sk
,
skb
);
}
if
(
dp
->
dccps_hc_rx_insert_options
)
{
ccid_hc_rx_insert_options
(
dp
->
dccps_hc_rx_ccid
,
sk
,
skb
);
dp
->
dccps_hc_rx_insert_options
=
0
;
}
if
(
dp
->
dccps_hc_tx_insert_options
)
{
ccid_hc_tx_insert_options
(
dp
->
dccps_hc_tx_ccid
,
sk
,
skb
);
dp
->
dccps_hc_tx_insert_options
=
0
;
}
/* XXX: insert other options when appropriate */
...
...
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