From patchwork Thu Oct 17 22:48:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 1179048 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=nwl.cc Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46vPVh5vS1z9sPf for ; Fri, 18 Oct 2019 09:49:32 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441584AbfJQWta (ORCPT ); Thu, 17 Oct 2019 18:49:30 -0400 Received: from orbyte.nwl.cc ([151.80.46.58]:42648 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438306AbfJQWta (ORCPT ); Thu, 17 Oct 2019 18:49:30 -0400 Received: from localhost ([::1]:55738 helo=tatos) by orbyte.nwl.cc with esmtp (Exim 4.91) (envelope-from ) id 1iLEaG-00046C-Sb; Fri, 18 Oct 2019 00:49:28 +0200 From: Phil Sutter To: Pablo Neira Ayuso Cc: netfilter-devel@vger.kernel.org Subject: [iptables PATCH 1/8] xtables-restore: Treat struct nft_xt_restore_parse as const Date: Fri, 18 Oct 2019 00:48:29 +0200 Message-Id: <20191017224836.8261-2-phil@nwl.cc> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191017224836.8261-1-phil@nwl.cc> References: <20191017224836.8261-1-phil@nwl.cc> MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org This structure contains restore parser configuration, parser is not supposed to alter it. Suggested-by: Pablo Neira Ayuso Signed-off-by: Phil Sutter Acked-by: Pablo Neira Ayuso --- iptables/nft-shared.h | 2 +- iptables/xtables-restore.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h index 9d62913461fa4..a330aceb9785c 100644 --- a/iptables/nft-shared.h +++ b/iptables/nft-shared.h @@ -261,7 +261,7 @@ struct nft_xt_restore_cb { }; void xtables_restore_parse(struct nft_handle *h, - struct nft_xt_restore_parse *p, + const struct nft_xt_restore_parse *p, struct nft_xt_restore_cb *cb, int argc, char *argv[]); diff --git a/iptables/xtables-restore.c b/iptables/xtables-restore.c index 4f6d324bdafe9..cb03104e91a7b 100644 --- a/iptables/xtables-restore.c +++ b/iptables/xtables-restore.c @@ -86,7 +86,7 @@ static const struct xtc_ops xtc_ops = { }; void xtables_restore_parse(struct nft_handle *h, - struct nft_xt_restore_parse *p, + const struct nft_xt_restore_parse *p, struct nft_xt_restore_cb *cb, int argc, char *argv[]) {