All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: John Dykstra <john.dykstra1@gmail.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: [PATCHv2] tcp: Fix MD5 signature checking on IPv4 mapped sockets
Date: Thu, 16 Jul 2009 11:36:52 -0700	[thread overview]
Message-ID: <20090716113652.65dd1c8d@nehalam> (raw)
In-Reply-To: <1247756691.7627.5.camel@Maple>

On Thu, 16 Jul 2009 10:04:51 -0500
John Dykstra <john.dykstra1@gmail.com> wrote:

> This revision to the patch removes a misplaced
> blank line.
> 
> ---
> Fix MD5 signature checking so that an IPv4 active open
> to an IPv6 socket can succeed.  In particular, use the
> correct address family's signature generation function
> for the SYN/ACK.
> 
> Reported-by:   Stephen Hemminger <shemminger@vyatta.com>
> Signed-off-by: John Dykstra <john.dykstra1@gmail.com>

This fixes the syn-ack, but data does not flow.
I had a simpler attempt that had same problem:


--- a/net/ipv6/tcp_ipv6.c	2009-07-15 18:08:11.042505387 -0700
+++ b/net/ipv6/tcp_ipv6.c	2009-07-15 20:05:56.270009553 -0700
@@ -1169,8 +1169,17 @@ static int tcp_v6_conn_request(struct so
 #define want_cookie 0
 #endif
 
-	if (skb->protocol == htons(ETH_P_IP))
-		return tcp_v4_conn_request(sk, skb);
+	if (skb->protocol == htons(ETH_P_IP)) {
+		int err;
+#ifdef CONFIG_TCP_MD5SIG
+		tp->af_specific = &tcp_sock_ipv6_mapped_specific;
+#endif
+		err = tcp_v4_conn_request(sk, skb);
+#ifdef CONFIG_TCP_MD5SIG
+		tp->af_specific = &tcp_sock_ipv6_specific;
+#endif
+		return err;
+	}
 
 	if (!ipv6_unicast_destination(skb))
 		goto drop;

  reply	other threads:[~2009-07-16 18:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-16 15:04 [PATCHv2] tcp: Fix MD5 signature checking on IPv4 mapped sockets John Dykstra
2009-07-16 18:36 ` Stephen Hemminger [this message]
2009-07-17 19:23   ` [PATCH] tcp: Use correct peer adr when copying MD5 keys (WAS: [PATCHv2] tcp: Fix MD5 signature checking on IPv4 mapped sockets) John Dykstra
2009-07-20 14:50     ` [PATCH] tcp: Use correct peer adr when copying MD5 keys David Miller
2009-07-20 14:50 ` [PATCHv2] tcp: Fix MD5 signature checking on IPv4 mapped sockets David Miller

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=20090716113652.65dd1c8d@nehalam \
    --to=shemminger@vyatta.com \
    --cc=john.dykstra1@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.