From owner-freebsd-transport@freebsd.org Mon Jul 25 18:37:27 2016 Return-Path: Delivered-To: freebsd-transport@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 ED2BFB9CF86 for ; Mon, 25 Jul 2016 18:37:27 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2CED1629 for ; Mon, 25 Jul 2016 18:37:27 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x231.google.com with SMTP id m101so169394005ioi.2 for ; Mon, 25 Jul 2016 11:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=m5bDQzDELHT6bnLx75q9HxSrx9Mv1w/wp9jdBeyZWf0=; b=n4fuI/cZktMRpb+WOCfgoAlIVEvxPuG3NRgbfDL/cOaY8v5/IVIRjGBJdprtH0fhek cZlNPw7WuXibM8eTBgKU4Q85ASG6PUmyc1Y7ThEGeIXJPIdfqzeBt+0X15iJ4VPxZtiH 8kvbtGvJUP5qXOvjSVIxQ4Wg/FOfUHJGmppg/I4tRps91kqGh401q42P8A71Wlk9ZIKP gEgrIlR+ybQdq8pptEIt7nUhwyvCHx3jVbpcnVyx3VM77kxtOoKXYSHuZW0qDptgdko2 P8lyZfepp/KCQpEjkTgdrnnB/kOyGW+p1maqtJJ9txi4fauIuNKzl2Nhwwz2pPVuKug4 Ggig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=m5bDQzDELHT6bnLx75q9HxSrx9Mv1w/wp9jdBeyZWf0=; b=Q5qSNb+bITSElxjwRhFJG6QhbSohSS/R87QxVYbewJttip6sTCsscxMfmnSNWrqQ3D DKD7GAfE/x0OHGBF0/NkJt8HpluYlMm3XWfm14MQE9+Kr6ZSpbskfVVU4k+8aBpZxXo7 9L6r4ZCeZOeP8IWSOU5tOk8eKyx5FKoFbp+06/iPbMWu/NVTuMULE7yS9/UTNxKsic2v 9HFlapwyh4kIK3emmpcpD70U0QNt+dtdAKGVAFb7YdsP1Q/RJNuyz8uuJrwkXcg6xXu+ HKeefpwLI7uLY6rEF74Yr24fnVt6FQ7cBPE72OQEJkBNKBF7upIo5vhwSqAQsLgI1kMY sFfA== X-Gm-Message-State: AEkoouszKRlIbLf/1HjoRwRR7kUzdpvm8nOM/QTB9GoxqRKuZompKeygieJyIUZDCM3hZ2GuoxrU3ZJRP09KmA== X-Received: by 10.107.144.10 with SMTP id s10mr20980462iod.165.1469471847201; Mon, 25 Jul 2016 11:37:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.141.129 with HTTP; Mon, 25 Jul 2016 11:37:26 -0700 (PDT) In-Reply-To: References: <559f1d0e-9d35-f458-bff5-b69a03297cf0@netflix.com> From: Adrian Chadd Date: Mon, 25 Jul 2016 11:37:26 -0700 Message-ID: Subject: Re: in_broadcast() called for almost every packet in ip_output() To: Ryan Stone Cc: Andrew Gallatin , "" Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Mon, 25 Jul 2016 19:11:59 +0000 X-BeenThere: freebsd-transport@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions of transport level network protocols in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 18:37:28 -0000 hi, can you post a separate patch for the 802.11 fix? I'd like to get it more widely tested! Thanks, -adrian On 25 July 2016 at 11:09, Ryan Stone wrote: > On Wed, Jul 20, 2016 at 7:57 PM, Ryan Stone wrote: >> >> Would it be correct to check for M_BCAST on the packet before checking for >> for a broadcast IP address? I don't believe that there would be any >> security concerns with that approach. If somebody injected a UDP packet >> with a broadcast IP address but a unicast MAC address, we would try to look >> up a pcb that matched, fail to find anything, and then drop the packet. > > > Ok, I've put this up for review, along with a fix for the 802.11 stack to > have it set M_BCAST properly: > https://reviews.freebsd.org/D7309 > > Are there any other L2 protocols that we support other than Ethernet and > 802.11 that I should audit to ensure it sets M_BCAST properly.