]> git.baikalelectronics.ru Git - kernel.git/commit
[DCCP] ccid3: Avoid congestion control on zero-sized data packets
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Mon, 27 Nov 2006 14:26:57 +0000 (12:26 -0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 3 Dec 2006 05:30:39 +0000 (21:30 -0800)
commit9371258839726984658c54b54ac03ee1988fabab
tree1eea49e2f94f359d9293025c64f381d43dd5922f
parent8b5ed100e13f7669f379e1805e27633e4393c9c2
[DCCP] ccid3: Avoid congestion control on zero-sized data packets

This resolves an `XXX' in ccid3_hc_tx_send_packet().

The function is only called on Data and DataAck packets and returns a negative
result on zero-sized messages. This is a reasonable policy since CCID 3 is a
congestion-control module and congestion control on zero-sized Data(Ack)
packets is in a way pathological.

The patch uses a more suitable error code for this case, it returns the Posix.1
code `EBADMSG' ("Not a data message") instead of `ENOTCONN'.

As a result of ignoring zero-sized packets, a the condition for a warning
"First packet is data" in ccid3_hc_tx_packet_sent is always satisfied; this
message has been removed since it will always be printed.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
net/dccp/ccids/ccid3.c