From owner-svn-src-all@freebsd.org Sat Aug 20 11:48:10 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5469BBF097; Sat, 20 Aug 2016 11:48:10 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAF3A1B9B; Sat, 20 Aug 2016 11:48:10 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 6AD9820248; Sat, 20 Aug 2016 07:48:09 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Sat, 20 Aug 2016 07:48:09 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=dM81jlqjZi/vINEioo43lhyBipk=; b=HpJtbc UA31uyG7hw791hNn4Qfqqdvc34iT+IcOnFVEw66cQua19e1jMXnXqq7OOJGYTtpK yWO65rWVRZZV33QH5fCfuYtjCmDa0dEs7qi/np8VJk2iIyaye9nGeDbTB5J8d/Yr pNs88m4LLkdJABGpaE9DVv1ugB8byOc3Vlim4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=dM81jlqjZi/vINE ioo43lhyBipk=; b=c+9M1V83oSknCS+VcvWbu5TbAm36chtZJqT9glTZ1H1PG+q baYJtf+6eLiTeMwOThpat7vW7T+kWk/ba6+FPdevTbBQoJ1zPYx6dI4VxgfKHzlM C58fbv0YQlxqj73S/6QqjixHtkZFWvBRNUsoizUC/94Dze3fy/wb0OZKsIeg= X-Sasl-enc: T0q1dIbBgEf8uXfYEacP89j23rOX/uhakPSfqnZbeu5A 1471693689 Received: from pion.local (cpc96954-walt26-2-0-cust843.13-2.cable.virginm.net [82.31.91.76]) by mail.messagingengine.com (Postfix) with ESMTPA id A74E8CC021; Sat, 20 Aug 2016 07:48:08 -0400 (EDT) Subject: Re: svn commit: r304436 - in head: . sys/netinet To: Ryan Stone , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201608182259.u7IMx5oW002018@repo.freebsd.org> <4fbc2e1d-3a62-5963-83d5-f9c931503e51@fastmail.net> From: Bruce Simpson Message-ID: <3806700d-ed27-7915-4818-c2d64f7b806d@fastmail.net> Date: Sat, 20 Aug 2016 12:48:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <4fbc2e1d-3a62-5963-83d5-f9c931503e51@fastmail.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2016 11:48:10 -0000 On 20/08/16 12:33, Bruce Simpson wrote: > This potentially breaks reception of IPv4 broadcasts where FreeBSD is > the endpoint at the end of a P2P interface, or other forms of links, > where there is no guarantee that the link layer will set M_BCAST (or > indeed M_MCAST). I appreciate it probably looks like a quick win, but if it's only been tested with Ethernet (it looks like it has only been written with Ethernet in mind), it does strongly look as if it breaks broadcast for UDP/IPv4 in other situations. So, maybe it should be backed out ASAP. (I haven't tested this code.) It is perfectly legal for broadcast packets to be addressed to the end of a P2P or non-Ethernet link, which may not set M_BCAST or M_MCAST. The classic example is ATM (Non-Broadcast, Multiple Access (NBMA)) but the situation may be readily observed with loopback or tunnels. The same issue doesn't exist in your output path change, which looks sane. The same issue doesn't exist with IPv6 where broadcast is dead.