From owner-freebsd-net@freebsd.org Thu Oct 11 12:31:40 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96DA510B98A8 for ; Thu, 11 Oct 2018 12:31:40 +0000 (UTC) (envelope-from kempe@lysator.liu.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) (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 0848E9656C for ; Thu, 11 Oct 2018 12:31:39 +0000 (UTC) (envelope-from kempe@lysator.liu.se) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 50D4F4000E for ; Thu, 11 Oct 2018 14:31:37 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 2A19540012; Thu, 11 Oct 2018 14:31:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.4.1 X-Spam-Score: -1.2 Received: from drd1812.nothing.org (mail.actia.se [195.67.112.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id BDAF04000E for ; Thu, 11 Oct 2018 14:31:36 +0200 (CEST) Subject: Re: Patching ng_iface to allow setting the MTU via netgraph API To: freebsd-net@freebsd.org References: <33666112-c7e1-df6c-dfd5-22de0c1166fa@lysator.liu.se> <48910140-ef82-dd21-3ca3-924e80e93b3b@grosbein.net> From: Andreas Kempe Openpgp: preference=signencrypt Autocrypt: addr=kempe@lysator.liu.se; keydata= xsFNBFfcARkBEACpvItp92qIKstHBKcdfFF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JFIcnvDgXZt63m97ZO2u5vpPrG9ZFeNJQjEYQARAQABwsFl BBgBAgAPAhsMBQJbgDHbBQkFhWRCAAoJEApKiq4XCkg94VsP/3pxr2cumMpqq8QFVwcsAvQQ YfzWnLfTty2f5djyNCUqp9voELqlJevUmKU7rp6aOHncNAws4RT23jQ+HWT/Hf4gafgFJJvn zarSt98jbFaeosFanxNX0lhk/vXaiMtrgjZ9Pa1tq8tNpfgQc1gLzrTVXWBBse9yIiEGxjM4 1Qm/1AgZk20ZO+7L1ykk/e7YKzIjttSlm8g1RkYDDCUnixZyyqFsYR1CU8MJVLTkIHVaVKGQ IO+Qmui6JFf/3voVl7Po3HbCi5ufWacAMYNAJtueb3bSMGkYiN0TCey9Ph4vXM4nHcf3QaPo nuQOysvrij2iyIdfFHmHH/Sx/esEX9Ynx5/HkM7ceQJtQjBxjPKNXXeoOKH1P3RhgE+d72QC ip2bGbGFS7r31wE3UbDaWgmARrSpTR10PWZCV4CxLVEppavXUkZjKw8ebCtQVEZEwPlAjhal /oUlagEw2m4ZGjl6EdtJxNZEhqWCpnzgNHiUzfPRGBnsu8d2ByAS3qv2t6RbiOgLhi1yInzc 80U8r3SMIJE++5ED5l81sm7csnNCDElf7QZK7n+9GEKvgoHgOrlBb0a0cu6z/IJ1o1R4LgfK cFAvGN+Ym4yuBMZEqUnLUF0n0OyMw4CvCMhh+II0YTsdqSOe5CI9LwxUqUIzPJJQw+7ahP7g qK9cqiHZL9a+ Message-ID: Date: Thu, 11 Oct 2018 14:31:36 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <48910140-ef82-dd21-3ca3-924e80e93b3b@grosbein.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Oct 2018 12:31:40 -0000 On 2018-10-10 22:33, Eugene Grosbein wrote: > However, this patch does not seem quite right to me. It may serve your needs > but it is incomplete in general case. You see, change in MTU should affect not only > interface itself, it should also alter routing table and "interface link" routes > that also have MTU attribute that is used for handling outgoing IP packets utilizing such routes. > I am no expert on FreeBSD internals. I was wondering about this exact aspect and was hoping to get feedback just like this. > Why do you want to replicate this at NETGRAPH level? > ng_iface(4) was created to be generic network interface to NOT duplicate such things. > After reading this, I went back and read the manual to ifconfig again. My wish is based on a misconception. I thought that the point-to-point vs. broadcast setting was general for all interfaces and could be readily set by using ifconfig ptp. As there was already duplication on that setting, I didn't see any real issue with setting the MTU via netgraph as well. Realising this is not the case has made me see that my idea isn't a great one. At least I know how to submit a patch in the future if I get actually well thought out ideas. Thank you for the feedback! // Andreas Kempe