From patchwork Thu Jul 16 18:36:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stephen hemminger X-Patchwork-Id: 29869 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 12690B7084 for ; Fri, 17 Jul 2009 04:37:06 +1000 (EST) Received: by ozlabs.org (Postfix) id 02C0DDDDA0; Fri, 17 Jul 2009 04:37:06 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 932D7DDD1C for ; Fri, 17 Jul 2009 04:37:05 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933031AbZGPSg7 (ORCPT ); Thu, 16 Jul 2009 14:36:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933029AbZGPSg6 (ORCPT ); Thu, 16 Jul 2009 14:36:58 -0400 Received: from mail.vyatta.com ([76.74.103.46]:52628 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932801AbZGPSg6 (ORCPT ); Thu, 16 Jul 2009 14:36:58 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.vyatta.com (Postfix) with ESMTP id 470D44F4012; Thu, 16 Jul 2009 11:36:58 -0700 (PDT) X-Virus-Scanned: amavisd-new at tahiti.vyatta.com Received: from mail.vyatta.com ([127.0.0.1]) by localhost (mail.vyatta.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DBMDMq6HzhzT; Thu, 16 Jul 2009 11:36:53 -0700 (PDT) Received: from nehalam (pool-71-117-243-208.ptldor.fios.verizon.net [71.117.243.208]) by mail.vyatta.com (Postfix) with ESMTP id 74C2A4F4011; Thu, 16 Jul 2009 11:36:53 -0700 (PDT) Date: Thu, 16 Jul 2009 11:36:52 -0700 From: Stephen Hemminger To: John Dykstra Cc: netdev Subject: Re: [PATCHv2] tcp: Fix MD5 signature checking on IPv4 mapped sockets Message-ID: <20090716113652.65dd1c8d@nehalam> In-Reply-To: <1247756691.7627.5.camel@Maple> References: <1247756691.7627.5.camel@Maple> Organization: Vyatta X-Mailer: Claws Mail 3.6.1 (GTK+ 2.16.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 16 Jul 2009 10:04:51 -0500 John Dykstra 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 > Signed-off-by: John Dykstra This fixes the syn-ack, but data does not flow. I had a simpler attempt that had same problem: --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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;