Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2583773ybi; Mon, 17 Jun 2019 07:15:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtbh4UP7arSDwhIHu6vo0BQNeq0i4gudL+T4ATZASStObTluwaoBmvCwEMEx+EbVgJqqRZ X-Received: by 2002:a62:750c:: with SMTP id q12mr94478809pfc.59.1560780907161; Mon, 17 Jun 2019 07:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560780907; cv=none; d=google.com; s=arc-20160816; b=e0UIDLqZLsjOppK9rlI4zYlBtyWwmxn+2/MYbn+4o8SYqwBPjtIzDrOjjnDbRvBNEI zTboNarZSiQ53yN3F9JVtLgT9wa5zxwAxZO1tY/iiq5AqzA9BcR6s3Dl+Ed9RU/IaMbg bf4gvD2VFpLQhO3miR/U3MTi4q3KUgnr8U3pjM6miAhJ3L2xWVc5mOyjmK/PYxRTRcOn fgo9n7PsbPcLKWqcECWWbKkE5vMxVRxVaVtpcrhUK5iqU0NBc4Wp2ZtXeRrsl/ZftR3z k9G8sChYBOZy26Di/r4HydQmFA7zfq3CB5c/YenHzdhik8ef724LONIO+f08Bksp4CpZ H+gw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=IfMMacDCEm5DrweDwYWF788XFS0vnRBrlp52D5AlxZY=; b=c3CW5LyUqcgGI8rbDWg8Fv8SQ2JzVp7zr1GvfDzLByybdYGC+BbI0IqjrlyRmnJLSV I7s42uk8ZLmpUmJzci2JrQX5Qh58uu7KvNt/VspRZN4ndK50IJy5Kt3G3hkhqyY4V5dE 7OAATHHdzl8UEQ2pkQziFi9bO9MJcq/9DvZ81IbSPd1f62ZpOh2Gq4t20HXJxgfJfu5k 0CUzDO/1Ju1d9YPrLdNO9qV3/dAP4q5+ZchoLVaV3b9rb3JtiSfTUbXrTYrsTOx2SCAz YmdR6YuouVjERijKSQ2Lke3ftVkFvK7HIV4qeHFTK8UkSi/kC7Zaut8OF5wi4uWTgSwC bVHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cvDCotR4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 204si10647736pga.373.2019.06.17.07.14.51; Mon, 17 Jun 2019 07:15:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cvDCotR4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728126AbfFQOOb (ORCPT + 99 others); Mon, 17 Jun 2019 10:14:31 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:41340 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728036AbfFQOO3 (ORCPT ); Mon, 17 Jun 2019 10:14:29 -0400 Received: by mail-io1-f65.google.com with SMTP id w25so21410540ioc.8; Mon, 17 Jun 2019 07:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=IfMMacDCEm5DrweDwYWF788XFS0vnRBrlp52D5AlxZY=; b=cvDCotR4yV8JD1WStg2ykTBlVb4D2EG+aZ2eHDNyE16zkhSPlS2rll6A433QvIP+d4 bOOvG5/lQk7Nmm8XPRstaeQaKmAZQpQ3aOtqCYm5QMpmnB4CibSiIs8shiNUR+PaayL8 XLaZgRgffRrooFzRlk1rwZjsuWQ29sGtlX9Xt97KVc4KQfulmtO7QP1bBy1IVXaHVH7Q m1Sd3enQWqzrYyV6ukMmH8BM3PljZUidJXSCWguBo2b43klrYzfWDenXLJh+mIJ1HtuW AP9R2FaDWaT1PzKSxKn7/Qr7nq+k24gVBYiH/GiBuxZzT3NXZJ87zpOpFmoTNY8MuBHU DO9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=IfMMacDCEm5DrweDwYWF788XFS0vnRBrlp52D5AlxZY=; b=c6J7ORjsIKnrm1TGhhpQYNPUmQFBH8Ngr2zpSCCWZ/QCAL+wCqfOqg6nbkmOT+Ia7h j2ufpY7fW9eE6l/KABQWUJtlKk7X+DtryQJS2IgFbe2Gl7oL2ToLdTTlPptVt7Htf3o7 Yo0ca8Rx0Vkkxk8OxMDhgTOJsww5ncxF8QQo/PekHxJ/6tuHnJiszJfZ1YarX2Hxb/RD aphO+pjCpn6MiPsqiSEDtpuuKEwvGnO+vN1lMP5Rhnrg1Cx/yK2VYMO5ltwbftJkpJUN US3epsDZ1iqLoCyngsaiRxFKVsfONN/LjhGw0gtnjyGOpkGuDZN8ofX5D3qOTCBMLxBI nQ4Q== X-Gm-Message-State: APjAAAUh0xOq5ORtVc3rUVcRXB7I6114ptqjWJ6GWfVBFMVCii/o4EQt ETYRA6ZSC4vWoITy2BxIxmYTCidD X-Received: by 2002:a05:6602:2253:: with SMTP id o19mr30456906ioo.297.1560780868559; Mon, 17 Jun 2019 07:14:28 -0700 (PDT) Received: from ?IPv6:2601:282:800:fd80:f1:4f12:3a05:d55e? ([2601:282:800:fd80:f1:4f12:3a05:d55e]) by smtp.googlemail.com with ESMTPSA id a2sm8888533iod.57.2019.06.17.07.14.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 07:14:27 -0700 (PDT) Subject: Re: [PATCH bpf] bpf: fix the check that forwarding is enabled in bpf_ipv6_fib_lookup To: =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , Anton Protopopov , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , "David S. Miller" , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190615225348.2539-1-a.s.protopopov@gmail.com> <877e9ka2aj.fsf@toke.dk> From: David Ahern Message-ID: Date: Mon, 17 Jun 2019 08:14:23 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <877e9ka2aj.fsf@toke.dk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/17/19 5:17 AM, Toke Høiland-Jørgensen wrote: > Anton Protopopov writes: > >> The bpf_ipv6_fib_lookup function should return BPF_FIB_LKUP_RET_FWD_DISABLED >> when forwarding is disabled for the input device. However instead of checking >> if forwarding is enabled on the input device, it checked the global >> net->ipv6.devconf_all->forwarding flag. Change it to behave as expected. >> >> Signed-off-by: Anton Protopopov > > Thanks! > > Acked-by: Toke Høiland-Jørgensen > Fixes: 87f5fc7e48dd ("bpf: Provide helper to do forwarding lookups in kernel FIB table") Reviewed-by: David Ahern