From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936508AbXGZUpY (ORCPT ); Thu, 26 Jul 2007 16:45:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751389AbXGZUpN (ORCPT ); Thu, 26 Jul 2007 16:45:13 -0400 Received: from [12.38.223.190] ([12.38.223.190]:32961 "EHLO mail.sw.starentnetworks.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932349AbXGZUpM (ORCPT ); Thu, 26 Jul 2007 16:45:12 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18089.1986.267726.233112@zeus.sw.starentnetworks.com> Date: Thu, 26 Jul 2007 16:44:50 -0400 From: Dave Johnson To: Vlad Yasevich Cc: lksctp-developers@lists.sourceforge.net, linux-kernel@vger.kernel.org, Srinivas Akkipeddi Subject: Re: [PATCH] SCTP: IPv4 mapped addr not returned in SCTPv6 accept() In-Reply-To: <46A8F926.1070606@hp.com> References: <18087.57737.908842.337891@zeus.sw.starentnetworks.com> <46A8E027.10802@hp.com> <18088.61269.5608.925496@zeus.sw.starentnetworks.com> <46A8F926.1070606@hp.com> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Vlad Yasevich writes: > Ok. First, this is a different bug, so I would prefer a separate patch. > Also, I see the problem and it's ugly, but this solution is not really correct, > both conceptually and code wise. > > Conceptually, the v4 code should never worry about V4-mapped addresses and shouldn't > muck with them. They are IPv6 addresses and there should be a clean separation. > > Code wise, the code in the __sctp_connect() is terrible. > > Does the attached patch work for you in this case. yes, with the v4mapped in ipv6.c and your patch, connect and accept both work with v4 mapped addresses. Note instead of: > + af = sctp_get_af_specific(sa_addr->sa.sa_family); > + af->to_sk_daddr(sa_addr, sk); you should have: > + af = sctp_get_af_specific(sa_addr->sa_family); > + af->to_sk_daddr((union sctp_addr *)sa_addr, sk); -- Dave Johnson Starent Networks