netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
To: "David S. Miller" <davem@redhat.com>
Cc: critson@perlfu.co.uk, torvalds@transmeta.com,
	linux-kernel@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: [PATCH][2.5.22] OOPS in tcp_v6_get_port
Date: Mon, 17 Jun 2002 21:57:35 -0300	[thread overview]
Message-ID: <20020618005735.GB1146@conectiva.com.br> (raw)
In-Reply-To: <20020617.143319.54623892.davem@redhat.com>

Em Mon, Jun 17, 2002 at 02:33:19PM -0700, David S. Miller escreveu:
> 
> This is a known bug introduced by the struct sock splitup into
> external per-protocol pieces done by Arnaldo de Melo.  He is working
> on the proper fix, your proposed change will just paper over the real
> bug.

Carl,

	Can you try this patch?

- Arnaldo

--- orig/net/ipv6/tcp_ipv6.c	Sat May 25 23:13:56 2002
+++ linux/net/ipv6/tcp_ipv6.c	Fri Jun 14 23:23:07 2002
@@ -1240,6 +1240,7 @@
 					  struct dst_entry *dst)
 {
 	struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
+	struct tcp6_sock *newtcp6sk;
 	struct flowi fl;
 	struct inet_opt *newinet;
 	struct tcp_opt *newtp;
@@ -1256,10 +1257,15 @@
 		if (newsk == NULL) 
 			return NULL;
 
+		newtcp6sk = (struct tcp6_sock *)newsk;
+		newtcp6sk->pinet6 = &newtcp6sk->inet6;
+
 		newinet = inet_sk(newsk);
 		newnp = inet6_sk(newsk);
 		newtp = tcp_sk(newsk);
 
+		memcpy(newnp, np, sizeof(struct ipv6_pinfo));
+
 		ipv6_addr_set(&newnp->daddr, 0, 0, htonl(0x0000FFFF),
 			      newinet->daddr);
 
@@ -1336,9 +1342,15 @@
 	ip6_dst_store(newsk, dst, NULL);
 	sk->route_caps = dst->dev->features&~NETIF_F_IP_CSUM;
 
+	newtcp6sk = (struct tcp6_sock *)newsk;
+	newtcp6sk->pinet6 = &newtcp6sk->inet6;
+
 	newtp = tcp_sk(newsk);
 	newinet = inet_sk(newsk);
 	newnp = inet6_sk(newsk);
+
+	memcpy(newnp, np, sizeof(struct ipv6_pinfo));
+
 	ipv6_addr_copy(&newnp->daddr, &req->af.v6_req.rmt_addr);
 	ipv6_addr_copy(&newnp->saddr, &req->af.v6_req.loc_addr);
 	ipv6_addr_copy(&newnp->rcv_saddr, &req->af.v6_req.loc_addr);


-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

  parent reply	other threads:[~2002-06-18  0:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-17 20:26 [PATCH][2.5.22] OOPS in tcp_v6_get_port Carl Ritson
2002-06-17 21:33 ` David S. Miller
     [not found] ` <20020617.143319.54623892.davem@redhat.com>
2002-06-18  0:57   ` Arnaldo Carvalho de Melo [this message]
2002-06-18  2:17     ` David S. Miller
     [not found]     ` <20020617.191726.55300824.davem@redhat.com>
2002-06-18  2:49       ` Arnaldo Carvalho de Melo
2002-06-18  3:58         ` [BKPATCH] " Arnaldo Carvalho de Melo
     [not found]         ` <20020618035804.GA18759@conectiva.com.br>
2002-06-18  4:15           ` Arnaldo Carvalho de Melo
     [not found]           ` <20020618041539.GB18759@conectiva.com.br>
2002-06-18  4:17             ` David S. Miller
2002-06-18  7:38     ` Carl Ritson
2002-06-18  9:43   ` kuznet
2002-06-18  9:58     ` David S. Miller
2002-06-19  9:54       ` Arnaldo Carvalho de Melo
2002-06-18 11:51 ` net/ipv6/exthdrs.c Andras Kis-Szabo
2002-06-18 12:00   ` net/ipv6/exthdrs.c Pekka Savola
2002-06-18 13:50     ` net/ipv6/exthdrs.c Andras Kis-Szabo
2002-06-18 14:00       ` [PATCH] net/ipv6/exthdrs.c Andras Kis-Szabo
2002-06-18 19:03   ` net/ipv6/exthdrs.c kuznet
     [not found]     ` <1024435482.1332.10.camel@arwen>
2002-06-19  9:30       ` net/ipv6/exthdrs.c Kis-Szabo Andras
2002-06-19  9:42         ` net/ipv6/exthdrs.c kuznet

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=20020618005735.GB1146@conectiva.com.br \
    --to=acme@conectiva.com.br \
    --cc=critson@perlfu.co.uk \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=torvalds@transmeta.com \
    /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).