From patchwork Sat Oct 29 08:03:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16779 X-Patchwork-Delegate: sven@narfation.org Return-Path: 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 ; 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 ; 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" From: Johannes Berg 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 Signed-off-by: David S. Miller Signed-off-by: Sven Eckelmann --- Patch already in net-next net/batman-adv/netlink.c | 1 - 1 file changed, 1 deletion(-) 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,