<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/dccp/input.c, branch linux-2.6.24.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.24.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.24.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2007-10-24T12:27:48Z</updated>
<entry>
<title>[DCCP]: Convert Reset code into socket error number</title>
<updated>2007-10-24T12:27:48Z</updated>
<author>
<name>Gerrit Renker</name>
</author>
<published>2007-10-24T12:27:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d8ef2c29a0dcfccb2d90cac990143d1a4668708a'/>
<id>urn:sha1:d8ef2c29a0dcfccb2d90cac990143d1a4668708a</id>
<content type='text'>
This adds support for converting the 11 currently defined Reset codes into system
error numbers, which are stored in sk_err for further interpretation.

This makes the externally visible API behaviour similar to TCP, since a client
connecting to a non-existing port will experience ECONNREFUSED.

* Code 0, Unspecified, is interpreted as non-error (0);
* Code 1, Closed (normal termination), also maps into 0;
* Code 2, Aborted, maps into "Connection reset by peer" (ECONNRESET);
* Code 3, No Connection and
  Code 7, Connection Refused, map into "Connection refused" (ECONNREFUSED);
* Code 4, Packet Error, maps into "No message of desired type" (ENOMSG);
* Code 5, Option Error, maps into "Illegal byte sequence" (EILSEQ);
* Code 6, Mandatory Error, maps into "Operation not supported on transport endpoint" (EOPNOTSUPP);
* Code 8, Bad Service Code, maps into "Invalid request code" (EBADRQC);
* Code 9, Too Busy, maps into "Too many users" (EUSERS);
* Code 10, Bad Init Cookie, maps into "Invalid request descriptor" (EBADR);
* Code 11, Aggression Penalty, maps into "Quota exceeded" (EDQUOT)
  which makes sense in terms of using more than the `fair share' of bandwidth.

Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
Acked-by: Ian McDonald &lt;ian.mcdonald@jandi.co.nz&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>[DCCP]: fix link error with !CONFIG_SYSCTL</title>
<updated>2007-10-18T02:33:06Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2007-10-18T02:33:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bd5435e76a226b7151ae5aaee2cd366ab003dd2e'/>
<id>urn:sha1:bd5435e76a226b7151ae5aaee2cd366ab003dd2e</id>
<content type='text'>
Do not define the sysctl_dccp_sync_ratelimit sysctl variable in the
CONFIG_SYSCTL dependent sysctl.c module - move it to input.c instead.

This fixes the following build bug:

 net/built-in.o: In function `dccp_check_seqno':
 input.c:(.text+0xbd859): undefined reference to `sysctl_dccp_sync_ratelimit'
 distcc[29953] ERROR: compile (null) on localhost failed
 make: *** [vmlinux] Error 1

Found via 'make randconfig' build testing.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Ian McDonald &lt;ian.mcdonald@jandi.co.nz&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[DCCP]: Rate-limit DCCP-Syncs</title>
<updated>2007-10-10T23:52:43Z</updated>
<author>
<name>Gerrit Renker</name>
</author>
<published>2007-09-26T14:31:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a94f0f970549e63e54c80c4509db299c514d8c11'/>
<id>urn:sha1:a94f0f970549e63e54c80c4509db299c514d8c11</id>
<content type='text'>
This implements a SHOULD from RFC 4340, 7.5.4:
 "To protect against denial-of-service attacks, DCCP implementations SHOULD
  impose a rate limit on DCCP-Syncs sent in response to sequence-invalid packets,
  such as not more than eight DCCP-Syncs per second."

The rate-limit is maintained on a per-socket basis. This is a more stringent
policy than enforcing the rate-limit on a per-source-address basis and
protects against attacks with forged source addresses.

Moreover, the mechanism is deliberately kept simple. In contrast to
xrlim_allow(), bursts of Sync packets in reply to sequence-invalid packets
are not supported.  This foils such attacks where the receipt of a Sync
triggers further sequence-invalid packets. (I have tested this mechanism against
xrlim_allow algorithm for Syncs, permitting bursts just increases the problems.)

In order to keep flexibility, the timeout parameter can be set via sysctl; and
the whole mechanism can even be disabled (which is however not recommended).

The algorithm in this patch has been improved with regard to wrapping issues
thanks to a suggestion by Arnaldo.

Commiter note: Rate limited the step 6 DCCP_WARN too, as it says we're
               sending a sync.

Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
Signed-off-by: Ian McDonald &lt;ian.mcdonald@jandi.co.nz&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
</content>
</entry>
<entry>
<title>[DCCP]: Send Reset upon Sync in state REQUEST</title>
<updated>2007-10-10T23:52:40Z</updated>
<author>
<name>Gerrit Renker</name>
</author>
<published>2007-09-26T13:30:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=08831700cc65f85a497d6b32b1c83ca84d71de4a'/>
<id>urn:sha1:08831700cc65f85a497d6b32b1c83ca84d71de4a</id>
<content type='text'>
This fixes the code to correspond to RFC 4340, 7.5.4, which states the
exception that a Sync received in state REQUEST generates a Reset (not
a SyncAck).

To achieve this, only a small change is required. Since
dccp_rcv_request_sent_state_process() already uses the correct Reset Code
number 4 ("Packet Error"), we only need to shift the if-statement a few
lines further down.

(To test this case: replace DCCP_PKT_RESPONSE with DCCP_PKT_SYNC
                    in dccp_make_response.)

Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
Signed-off-by: Ian McDonald &lt;ian.mcdonald@jandi.co.nz&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
</content>
</entry>
<entry>
<title>[DCCP]: Fix Reset/Sync-Flood Bug</title>
<updated>2007-10-10T23:52:37Z</updated>
<author>
<name>Gerrit Renker</name>
</author>
<published>2007-09-26T05:41:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e155d7692290f7bc539ccb8ebc3450ec964e53fd'/>
<id>urn:sha1:e155d7692290f7bc539ccb8ebc3450ec964e53fd</id>
<content type='text'>
This updates sequence number checking with regard to RFC 4340, 7.5.4.
Missing in the code was an exception for sequence-invalid Reset packets,
which get a Sync acknowledging GSR, instead of (as usual) P.seqno.

This can lead to an oscillating ping-pong flood of Reset packets.

In fact, it has been observed on the wire as follows:

 1. client establishes connection to server;
 2. before server can write to client, client crashes without notifying
    the server (NB: now no longer possible due to ABORT function);
 3. server sends DCCP-Data packet (has no ackno);
 4. client generates Reset "No Connection", seqno=0, increments seqno;
 5. server replies with Sync, using ackno = P.seqno;
 6. client generates Reset "No Connection" with seqno = ackno + 1;
 7. goto (5).

The difference is that now in (5) the server uses GSR.  This causes the
Reset sent by the client in (6) to become sequence-valid, so that in (7)
the vicious circle is broken; the Reset is then enqueued and causes the
socket to enter TIMEWAIT state.

Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
Signed-off-by: Ian McDonald &lt;ian.mcdonald@jandi.co.nz&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[DCCP]: Shorten variable names in dccp_check_seqno</title>
<updated>2007-10-10T23:52:36Z</updated>
<author>
<name>Gerrit Renker</name>
</author>
<published>2007-09-26T05:41:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cbe1f5f88af454303a9c1a0624209269430d49fe'/>
<id>urn:sha1:cbe1f5f88af454303a9c1a0624209269430d49fe</id>
<content type='text'>
This patch is in part required by the next patch; it

 * replaces 6 instances of `DCCP_SKB_CB(skb)-&gt;dccpd_seq' with `seqno';
 * replaces 7 instances of `DCCP_SKB_CB(skb)-&gt;dccpd_ack_seq' with `ackno';
 * replaces 1 use of dccp_inc_seqno() by unfolding `ADD48' macro in place.

No changes in algorithm, all changes are text replacement/substitution.

Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
Signed-off-by: Ian McDonald &lt;ian.mcdonald@jandi.co.nz&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[DCCP]: Simplify interface of dccp_sample_rtt</title>
<updated>2007-10-10T23:52:35Z</updated>
<author>
<name>Gerrit Renker</name>
</author>
<published>2007-09-26T05:40:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3393da8241ae3a53e183ba15f8bd822995ec97cd'/>
<id>urn:sha1:3393da8241ae3a53e183ba15f8bd822995ec97cd</id>
<content type='text'>
The third parameter of dccp_sample_rtt now becomes useless and is removed.

Also combined the subtraction of the timestamp echo and the elapsed time.
This is safe, since (a) presence of timestamp echo is tested first and (b)
elapsed time is either present and non-zero or it is not set and equals 0
due to the memset in dccp_parse_options.

To avoid measuring option-processing time, the timestamp for measuring the
initial Request/Response RTT sample is taken directly when the function is
called (the Linux implementation always adds a timestamp on the Request,
so there is no loss in doing this).

Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
Signed-off-by: Ian McDonald &lt;ian.mcdonald@jandi.co.nz&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[DCCP]: Convert dccp_sample_rtt to ktime_t</title>
<updated>2007-10-10T23:48:13Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2007-08-20T00:16:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9823b7b5542858afe5b6a1e2df83b3847c28f3d6'/>
<id>urn:sha1:9823b7b5542858afe5b6a1e2df83b3847c28f3d6</id>
<content type='text'>
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[DCCP]: Sample RTT from SYN exchange</title>
<updated>2007-04-26T05:27:02Z</updated>
<author>
<name>Gerrit Renker</name>
</author>
<published>2007-03-20T18:27:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=89560b53b92a07c529e13a462aa7fd87a844f1f5'/>
<id>urn:sha1:89560b53b92a07c529e13a462aa7fd87a844f1f5</id>
<content type='text'>
Function:
</content>
</entry>
<entry>
<title>[DCCP]: Provide function for RTT sampling</title>
<updated>2007-04-26T05:27:00Z</updated>
<author>
<name>Gerrit Renker</name>
</author>
<published>2007-03-20T18:23:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4712a792ee661921374c163eb6a4d06e33fd305f'/>
<id>urn:sha1:4712a792ee661921374c163eb6a4d06e33fd305f</id>
<content type='text'>
A recurring problem, in particular in the CCID code, is that RTT samples
from packets with timestamp echo and elapsed time options need to be taken.

This service is provided via a new function dccp_sample_rtt in this patch.
Furthermore, to protect against `insane' RTT samples, the sampled value
is bounded between 100 microseconds and 4 seconds - for which u32 is sufficient.

Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
Signed-off-by: Ian McDonald &lt;ian.mcdonald@jandi.co.nz&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
