summaryrefslogtreecommitdiffstats
path: root/net/dccp/minisocks.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-12-13 23:24:53 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-03 13:10:52 -0800
commit3df80d9320bcaea72b1b4761a319c79cb3fdaf5f (patch)
tree20ca32dc85b1ec211c6bb91acd325e039bdb496f /net/dccp/minisocks.c
parent399c07def62a77678d633f5b3005431423a424a8 (diff)
downloadop-kernel-dev-3df80d9320bcaea72b1b4761a319c79cb3fdaf5f.zip
op-kernel-dev-3df80d9320bcaea72b1b4761a319c79cb3fdaf5f.tar.gz
[DCCP]: Introduce DCCPv6
Still needs mucho polishing, specially in the checksum code, but works just fine, inet_diag/iproute2 and all 8) Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/minisocks.c')
-rw-r--r--net/dccp/minisocks.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index 5c767b5..29261fc 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -52,7 +52,18 @@ void dccp_time_wait(struct sock *sk, int state, int timeo)
if (tw != NULL) {
const struct inet_connection_sock *icsk = inet_csk(sk);
const int rto = (icsk->icsk_rto << 2) - (icsk->icsk_rto >> 1);
-
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+ if (tw->tw_family == PF_INET6) {
+ const struct ipv6_pinfo *np = inet6_sk(sk);
+ struct inet6_timewait_sock *tw6;
+
+ tw->tw_ipv6_offset = inet6_tw_offset(sk->sk_prot);
+ tw6 = inet6_twsk((struct sock *)tw);
+ ipv6_addr_copy(&tw6->tw_v6_daddr, &np->daddr);
+ ipv6_addr_copy(&tw6->tw_v6_rcv_saddr, &np->rcv_saddr);
+ tw->tw_ipv6only = np->ipv6only;
+ }
+#endif
/* Linkage updates. */
__inet_twsk_hashdance(tw, sk, &dccp_hashinfo);
OpenPOWER on IntegriCloud