Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp118340ybt; Thu, 25 Jun 2020 16:57:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD7VeAYTKVGp8dNTlmSmD2OOHbBbgD1TiRisG9YP3rG2KmT06DL63f484IFNaNsuQ+uui6 X-Received: by 2002:a05:6402:22e4:: with SMTP id dn4mr751507edb.288.1593129450223; Thu, 25 Jun 2020 16:57:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593129450; cv=none; d=google.com; s=arc-20160816; b=Z3Z3/lh46ghkayqB6IaGJQUQTs+V2QknMzuBFlIMhQh26akC73wEXLEA9G5UafZYBh CNl/fKIEj0QwUbzJLjBokXY1XfBwBbCpRpYiVQUgCxcwEnMChD7sqJZe32lZUqDHN0PH QvqXUVdpTey7ruLNwO4e1FLcFrCL0YFrJMrtvGIbcyEG6gzyoFPakJwq8QAuAEN1TJqS 3zGfflgmXN09uE/byDLt1y2YST4/uLaiHN4ck/STykgqY6g6tX5zWsKUjyqjaDm9rwz3 R95GL1XpW1loBCqjI1VI3/wRxToFUb29nGN9zV2i0havHzlRdvguQLGL6wobOz3iS4Fu ZLqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=9hAobf2fzawh9v8HNLOdABeM24kaRjNzIRHbmB5tbJ0=; b=b+HYZtEkXRwU6rqqid5E/cWJE0ZlJVidxCm589vGyNExzrzF3FL6eJJUWPIawGEMmY mvPT3EGT09txNC2G4GcCWqoaSQ1r+FgLV/knz95rPm+G049GpJW35TcAh54fdC3QyRuu WP4NRa+AR9aySnr3yUVIMWuNNE/t1yRYC7JBeyFd4pozxre7w7PybW3dX0TNuBXZqZSo qRqdEG2DiD0pvTh32JHZnd9TIscJZlG7174sUHZaycBcYXocjE+mmHuOl9QEhqu3RqA1 d5Ph9+5Fs7AnLqV2AsjZhQttdDsxOlIdyeSZ7avhQZb0RcedEnStYicBrtYFd3uS/nDK xxSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lu12si9012883ejb.269.2020.06.25.16.57.07; Thu, 25 Jun 2020 16:57:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407691AbgFYXMI (ORCPT + 99 others); Thu, 25 Jun 2020 19:12:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403984AbgFYXMI (ORCPT ); Thu, 25 Jun 2020 19:12:08 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FBA1C08C5C1; Thu, 25 Jun 2020 16:12:08 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 65E94153D60A3; Thu, 25 Jun 2020 16:12:07 -0700 (PDT) Date: Thu, 25 Jun 2020 16:12:06 -0700 (PDT) Message-Id: <20200625.161206.1619464748667177222.davem@davemloft.net> To: marcelo.leitner@gmail.com Cc: netdev@vger.kernel.org, lucien.xin@gmail.com, Michael.Tuexen@lurchi.franken.de, vyasevich@gmail.com, nhorman@tuxdriver.com, linux-sctp@vger.kernel.org, linux-kernel@vger.kernel.org, cminyard@mvista.com Subject: Re: [PATCH net] sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket From: David Miller In-Reply-To: <991916791cdcc37456ccb061779d485063b97129.1593030427.git.marcelo.leitner@gmail.com> References: <20200623160417.12418-1-minyard@acm.org> <991916791cdcc37456ccb061779d485063b97129.1593030427.git.marcelo.leitner@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 25 Jun 2020 16:12:07 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marcelo Ricardo Leitner Date: Wed, 24 Jun 2020 17:34:18 -0300 > If a socket is set ipv6only, it will still send IPv4 addresses in the > INIT and INIT_ACK packets. This potentially misleads the peer into using > them, which then would cause association termination. > > The fix is to not add IPv4 addresses to ipv6only sockets. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Reported-by: Corey Minyard > Signed-off-by: Marcelo Ricardo Leitner Applied and queued up for -stable, thank you.