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=-2.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_NEOMUTT 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 D1DB7C48BD6 for ; Wed, 26 Jun 2019 10:58:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B012020656 for ; Wed, 26 Jun 2019 10:58:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726347AbfFZK6P (ORCPT ); Wed, 26 Jun 2019 06:58:15 -0400 Received: from Chamillionaire.breakpoint.cc ([193.142.43.52]:40074 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725930AbfFZK6P (ORCPT ); Wed, 26 Jun 2019 06:58:15 -0400 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.89) (envelope-from ) id 1hg5cy-0001Ng-Eq; Wed, 26 Jun 2019 12:58:12 +0200 Date: Wed, 26 Jun 2019 12:58:12 +0200 From: Florian Westphal To: Pablo Neira Ayuso Cc: Florian Westphal , Phil Sutter , netfilter-devel@vger.kernel.org Subject: Re: Use of oifname in input chains Message-ID: <20190626105812.kkq6bfdcoihmphrd@breakpoint.cc> References: <20190625122954.GC9218@orbyte.nwl.cc> <20190625194321.e2siqh7jfhldwzgw@salvia> <20190626103230.b7eqh2i3ibpkfv52@breakpoint.cc> <20190626103746.ag26jczoq7ggkh5b@salvia> <20190626104254.cfhkfpagequp6kuv@breakpoint.cc> <20190626104740.vw7xzrkoqd2lwzqh@salvia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190626104740.vw7xzrkoqd2lwzqh@salvia> User-Agent: NeoMutt/20170113 (1.7.2) Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Pablo Neira Ayuso wrote: > > delete jump from output # disallow? > > > > This seems rather suicidal to me. > > OK, you think there may be people using oifname from the C chain, but > how so? To skip rules that are specific to the output path? Maybe, or just to consolidate rules, e.g. chain C { [ some common rules ] meta oifname bla ... [ other common rules ] } After the proposed change, kernel refuses ruleset as soon as C is or becomes reachable from a prerouting/input basechain. (Alternatively, we could reject if not reachable from output/forward, but that seems even more crazy because we'd have to refuse ruleset that has unreachable chain with 'oifname' in it ...).