From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DEA3C282CE for ; Wed, 5 Jun 2019 01:34:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E359820717 for ; Wed, 5 Jun 2019 01:34:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726474AbfFEBex (ORCPT ); Tue, 4 Jun 2019 21:34:53 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:55456 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726341AbfFEBex (ORCPT ); Tue, 4 Jun 2019 21:34:53 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::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 ABD4315042E97; Tue, 4 Jun 2019 18:34:52 -0700 (PDT) Date: Tue, 04 Jun 2019 18:34:52 -0700 (PDT) Message-Id: <20190604.183452.368761665430431543.davem@davemloft.net> To: timbeale@catalyst.net.nz Cc: netdev@vger.kernel.org, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org Subject: Re: [PATCH net] udp: only choose unbound UDP socket for multicast when not in a VRF From: David Miller In-Reply-To: <1559613383-6086-1-git-send-email-timbeale@catalyst.net.nz> References: <1559613383-6086-1-git-send-email-timbeale@catalyst.net.nz> X-Mailer: Mew version 6.8 on Emacs 26.1 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]); Tue, 04 Jun 2019 18:34:52 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Tim Beale Date: Tue, 4 Jun 2019 13:56:23 +1200 > By default, packets received in another VRF should not be passed to an > unbound socket in the default VRF. This patch updates the IPv4 UDP > multicast logic to match the unicast VRF logic (in compute_score()), > as well as the IPv6 mcast logic (in __udp_v6_is_mcast_sock()). > > The particular case I noticed was DHCP discover packets going > to the 255.255.255.255 address, which are handled by > __udp4_lib_mcast_deliver(). The previous code meant that running > multiple different DHCP server or relay agent instances across VRFs > did not work correctly - any server/relay agent in the default VRF > received DHCP discover packets for all other VRFs. > > Signed-off-by: Tim Beale Applied and queued up for -stable, thanks.