Message ID | 20161029080328.26584-1-sven@narfation.org (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | 7582ad17bc6f5ff925ac85d79370956c72d842a5 |
Delegated to: | Sven Eckelmann |
Headers |
Return-Path: <b.a.t.m.a.n-bounces@lists.open-mesh.org> X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 632A6830FC; Sat, 29 Oct 2016 10:03:34 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=zUXdQFNl; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 64662830FB for <b.a.t.m.a.n@lists.open-mesh.org>; Sat, 29 Oct 2016 10:03:32 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p200300C593CDC8FD0000000000002E17.dip0.t-ipconnect.de [IPv6:2003:c5:93cd:c8fd::2e17]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id CD5FD1C8001 for <b.a.t.m.a.n@lists.open-mesh.org>; Sat, 29 Oct 2016 10:03:31 +0200 (CEST) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1477728211; bh=umkGwuogjlSFPtnRUaFCuGRi8nMZ+7+NvubWKqTf+h8=; h=From:To:Subject:Date:From; b=zUXdQFNlT5p/kPWIAhINXB+ZN5BBAjbTkhtj8RpvcUnCedWd9+s/Vnno/r/9oAzrI QrV69SkPuUIj9W/Sv2Jj7Cmwn+7bfkK1wQY/joUtxjxBPuZgMT6hxUNwDIlwBM6D+e rgtBfVccB12mBKfI8mRMMwJj667lse7ub5e2QDi0= From: Sven Eckelmann <sven@narfation.org> To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 29 Oct 2016 10:03:26 +0200 Message-Id: <20161029080328.26584-1-sven@narfation.org> X-Mailer: git-send-email 2.10.1 Subject: [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: genetlink: no longer support using static family IDs X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n.lists.open-mesh.org> List-Unsubscribe: <https://lists.open-mesh.org/mm/options/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=unsubscribe> List-Archive: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n/> List-Post: <mailto:b.a.t.m.a.n@lists.open-mesh.org> List-Help: <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=help> List-Subscribe: <https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=subscribe> Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n@lists.open-mesh.org> Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" <b.a.t.m.a.n-bounces@lists.open-mesh.org> |
Commit Message
Sven Eckelmann
Oct. 29, 2016, 8:03 a.m. UTC
From: Johannes Berg <johannes.berg@intel.com> Static family IDs have never really been used, the only use case was the workaround I introduced for those users that assumed their family ID was also their multicast group ID. Additionally, because static family IDs would never be reserved by the generic netlink code, using a relatively low ID would only work for built-in families that can be registered immediately after generic netlink is started, which is basically only the control family (apart from the workaround code, which I also had to add code for so it would reserve those IDs) Thus, anything other than GENL_ID_GENERATE is flawed and luckily not used except in the cases I mentioned. Move those workarounds into a few lines of code, and then get rid of GENL_ID_GENERATE entirely, making it more robust. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven@narfation.org> --- Patch already in net-next net/batman-adv/netlink.c | 1 - 1 file changed, 1 deletion(-)
Comments
On Samstag, 29. Oktober 2016 10:03:26 CET Sven Eckelmann wrote: > From: Johannes Berg <johannes.berg@intel.com> > > Static family IDs have never really been used, the only > use case was the workaround I introduced for those users > that assumed their family ID was also their multicast > group ID. > > Additionally, because static family IDs would never be > reserved by the generic netlink code, using a relatively > low ID would only work for built-in families that can be > registered immediately after generic netlink is started, > which is basically only the control family (apart from > the workaround code, which I also had to add code for so > it would reserve those IDs) > > Thus, anything other than GENL_ID_GENERATE is flawed and > luckily not used except in the cases I mentioned. Move > those workarounds into a few lines of code, and then get > rid of GENL_ID_GENERATE entirely, making it more robust. > > Signed-off-by: Johannes Berg <johannes.berg@intel.com> > Signed-off-by: David S. Miller <davem@davemloft.net> > Signed-off-by: Sven Eckelmann <sven@narfation.org> > --- > Patch already in net-next > > net/batman-adv/netlink.c | 1 - > 1 file changed, 1 deletion(-) Applied in 83e3cb32617d07a33fb43faa0957b91b3ac622c5 [1]. Kind regards, Sven [1] https://git.open-mesh.org/batman-adv.git/commit/83e3cb32617d07a33fb43faa0957b91b3ac622c5
diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c index aee20a3..a951e02 100644 --- a/net/batman-adv/netlink.c +++ b/net/batman-adv/netlink.c @@ -49,7 +49,6 @@ #include "translation-table.h" struct genl_family batadv_netlink_family = { - .id = GENL_ID_GENERATE, .hdrsize = 0, .name = BATADV_NL_NAME, .version = 1,