From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: [PATCH 1/5]: Exploit the `Ack Pending' flag
Date: Thu, 04 Oct 2007 14:01:48 +0000 [thread overview]
Message-ID: <200710041501.49058@strip-the-willow> (raw)
[DCCP]: Exploit the `Ack Pending' flag
This provides a wrapper around the function which sets the `Ack Pending' flag
on inet connection sockets. This is very useful for some DCCP cases, such as
the out-of-band feature negotiation of NN options for an established connection
(next patches).
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/dccp.h | 7 ++++++-
net/dccp/options.c | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -405,10 +405,15 @@ static inline void dccp_update_gss(struc
dp->dccps_awh = dp->dccps_gss;
}
+static inline void dccp_schedule_ack(struct sock *sk)
+{
+ inet_csk_schedule_ack(sk);
+}
+
static inline int dccp_ack_pending(const struct sock *sk)
{
const struct dccp_sock *dp = dccp_sk(sk);
- return dp->dccps_tstamp != NULL ||
+ return
#ifdef CONFIG_IP_DCCP_ACKVEC
(dp->dccps_hc_rx_ackvec != NULL &&
dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) ||
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -166,6 +166,7 @@ int dccp_parse_options(struct sock *sk,
opt_recv->dccpor_timestamp = ntohl(opt_val);
(*tse)->ts_echo = opt_recv->dccpor_timestamp;
+ dccp_schedule_ack(sk);
dccp_pr_debug("%s rx opt: TIMESTAMP=%u, ackno=%llu\n",
dccp_role(sk), opt_recv->dccpor_timestamp,
(unsigned long long)
next reply other threads:[~2007-10-04 14:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-04 14:01 Gerrit Renker [this message]
2007-10-05 6:27 ` [PATCH 1/5]: Exploit the `Ack Pending' flag Ian McDonald
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710041501.49058@strip-the-willow \
--to=gerrit@erg.abdn.ac.uk \
--cc=dccp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox