From: David Miller <davem@davemloft.net>
To: gerrit@erg.abdn.ac.uk
Cc: dccp@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/1] dccp: allow probing of CCID-array length
Date: Fri, 12 Feb 2010 12:07:38 -0800 (PST) [thread overview]
Message-ID: <20100212.120738.189368103.davem@davemloft.net> (raw)
In-Reply-To: <20100208062028.GA5478@gerrit.erg.abdn.ac.uk>
From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Date: Mon, 8 Feb 2010 07:20:28 +0100
> This fixes a problem in the DCCP getsockopt() API: currently there is no way
> for a user to a priori know the number of built-in CCIDs, other than trying
> DCCP_SOCKOPT_AVAILABLE_CCIDS in a loop, incrementing the option length until
> EINVAL is no longer returned.
>
> This patch truncates the array to the user-provided length. No copy is made
> when the length is <= 0.
>
> Due to the length restriction in do_dccp_getsockopt() to sizeof(int), the
> minimum array length remains 4, which is a reasonable default (only 3
> CCIDs, CCID-2..4, are currently defined).
>
> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Applied to net-next-2.6, thanks Gerrit.
prev parent reply other threads:[~2010-02-12 20:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-08 6:20 [PATCH 1/1] dccp: allow probing of CCID-array length Gerrit Renker
2010-02-12 20:07 ` David Miller [this message]
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=20100212.120738.189368103.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dccp@vger.kernel.org \
--cc=gerrit@erg.abdn.ac.uk \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).