21 Mar, 2006
40 commits
-
This is in preparation for having a dccp_minisock embedded into
dccp_request_sock so that feature negotiation can be done prior to
creating the full blown dccp_sock.Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
This will later be included in struct dccp_request_sock so that we can
have per connection feature negotiation state while in the 3way
handshake, when we clone the DCCP_ROLE_LISTEN socket (in
dccp_create_openreq_child) we'll just copy this state from
dreq_minisock to dccps_minisock.Also the feature negotiation and option parsing code will mostly touch
dccps_minisock, which will simplify some stuff.Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
No code changes, just tidying up, in some cases moving EXPORT_SYMBOLs
to just after the function exported, etc.Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
This patch extends {get|set}sockopt compatibility layer in order to
move protocol specific parts to their place and avoid huge universal
net/compat.c file in the future.Signed-off-by: Dmitry Mishin
Signed-off-by: David S. Miller -
Signed-off-by: David S. Miller
-
And not the silly LIMIT_NETDEBUG and silently return without inserting
the option requested.Also drop some old debugging messages associated to option insertion.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Merging it with its only user: dccp_v[46]_reqsk_send_ack.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Using this also provides opportunities for introducing
inet_csk_alloc_skb that would call alloc_skb, account it to the sock
and skb_reserve(max_header), but I'll leave this for later, for now
using sk_prot->max_header consistently is enough.Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
I.e. they should be just ignored, but we have to use 'break', not 'continue',
as we have to possibly reset the mandatory flag.Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
According to dccp draft (draft-ietf-dccp-spec-13.txt) section 5.8.2
(Mandatory Option) the following patch correct the handling of the
following cases:1) "... and any Mandatory options received on DCCP-Data packets MUST be
ignored."2) "The connection is in error and should be reset with Reset Code 5, ...
if option O is absent (Mandatory was the last byte of the option list), or
if option O equals Mandatory."Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: Hagen Paul Pfeifer
Signed-off-by: David S. Miller -
No changes in the logic where made.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
No changes in the logic were made, just removing trailing whitespaces,
etc.Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Consolidating open coded sequences in tcp and dccp, v4 and v6.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
I guess I forgot to add it, nah, now it just works:
18:04:33.274066 IP6 ::1.1476 > ::1.5001: request (service=0)
18:04:33.334482 IP6 ::1.5001 > ::1.1476: reset (code=bad_service_code)Ditched IP_DCCP_UNLOAD_HACK, as now we would have to do it for both
IPv6 and IPv4, so I'll come up with another way for freeing the
control sockets in upcoming changesets.Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
There's no reason for struct dccp_v4_prot being global.
Signed-off-by: Adrian Bunk
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
With this patch in place we can break down the complexity by better
compartmentalizing the code that is common to ipv6 and ipv4.Now we have these modules:
Module Size Used by
dccp_diag 1344 0
inet_diag 9448 1 dccp_diag
dccp_ccid3 15856 0
dccp_tfrc_lib 12320 1 dccp_ccid3
dccp_ccid2 5764 0
dccp_ipv4 16996 2
dccp 48208 4 dccp_diag,dccp_ccid3,dccp_ccid2,dccp_ipv4dccp_ipv6 still requires dccp_ipv4 due to dccp_ipv6_mapped, that is
the next target to work on the "hey, ipv4 is legacy, I only want ipv6
dude!" direction.Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
And introduce dccp_mib_exit grouping previously open coded sequence.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
As it is used by both ipv4 and ipv6.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
dccp_make_response is shared by ipv4/6 and the ipv6 code was
recalculating the checksum, not good, so move the dccp_v4_checksum
call to dccp_v4_send_response.Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
As this is used by both ipv4 and ipv6 and is not ipv4 specific.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Removing one more ipv6 uses ipv4 stuff case in dccp land.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Renaming it to dccp_send_reset and moving it from the ipv4 specific
code to the core dccp code.This fixes some bugs in IPV6 where timers would send v4 resets, etc.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
[root@qemu ~]# for a in /proc/sys/net/dccp/default/* ; do echo $a ; cat $a ; done
/proc/sys/net/dccp/default/ack_ratio
2
/proc/sys/net/dccp/default/rx_ccid
3
/proc/sys/net/dccp/default/send_ackvec
1
/proc/sys/net/dccp/default/send_ndp
1
/proc/sys/net/dccp/default/seq_window
100
/proc/sys/net/dccp/default/tx_ccid
3
[root@qemu ~]#So if wanting to test ccid3 as the tx CCID one can just do:
[root@qemu ~]# echo 3 > /proc/sys/net/dccp/default/tx_ccid
[root@qemu ~]# echo 2 > /proc/sys/net/dccp/default/rx_ccid
[root@qemu ~]# cat /proc/sys/net/dccp/default/[tr]x_ccid
2
3
[root@qemu ~]#Of course we also need the setsockopt for each app to tell its preferences, but
for testing or defining something other than CCID2 as the default for apps that
don't explicitely set their preference the sysctl interface is handy.Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
So that dccp_feat_clean doesn't get confused with uninitialized
list_heads.Noticed when testing with no ccid kernel modules.
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Make CCID2 and CCID3 default to what was selected for DCCP and use the
standard short description for the CCIDs (TCP-Like & TCP-Friendly).Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
This also fixes the layout of dccp_hdr short sequence numbers, problem
was not fatal now as we only support long (48 bits) sequence numbers.Signed-off-by: Andrea Bittau
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: Al Viro
Signed-off-by: David S. Miller -
Change the CCID upon successful feature negotiation.
Commiter note: patch mostly rewritten to use the new ccid API.
Signed-off-by: Andrea Bittau
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
1. No need for ->ccid_init nor ->ccid_exit, this is what module_{init,exit}
does and anynways neither ccid2 nor ccid3 were using it.2. Rename struct ccid to struct ccid_operations and introduce struct ccid
with a pointer to ccid_operations and rigth after it the rx or tx
private state.3. Remove the pointer to the state of the half connections from struct
dccp_sock, now its derived thru ccid_priv() from the ccid pointer.Now we also can implement the setsockopt for changing the CCID easily as
no ccid init routines can affect struct dccp_sock in any way that prevents
other CCIDs from working if a CCID switch operation is asked by apps.Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
There was a hybrid use of standard timers and sk_timers. This caused
the reference count of the sock to be incorrect when resetting the RTO
timer. The sock reference count should now be correct, enabling its
destruction, and allowing the DCCP module to be unloaded.Signed-off-by: Andrea Bittau
Signed-off-by: Arnaldo Carvalho de Melo -
Still needs more work, but boots and doesn't crashes, even
does some negotiation!18:38:52.174934 127.0.0.1.43458 > 127.0.0.1.5001: request
18:38:52.218526 127.0.0.1.5001 > 127.0.0.1.43458: response
18:38:52.185398 127.0.0.1.43458 > 127.0.0.1.5001::-)
Signed-off-by: Andrea Bittau
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Original work by Andrea Bittau, Arnaldo Melo cleaned up and fixed several
issues on the merge process.For now CCID2 was turned the default for all SOCK_DCCP connections, but this
will be remedied soon with the merge of the feature negotiation code.Signed-off-by: Andrea Bittau
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Testing if the ccid being instantiated has these methods in
ccid_init().Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Based on a patch by Andrea Bittau.
Signed-off-by: Andrea Bittau
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller -
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: David S. Miller