From patchwork Thu Oct 3 13:00:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Bursztyka X-Patchwork-Id: 280298 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 044EB2C00AA for ; Thu, 3 Oct 2013 23:00:55 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753646Ab3JCNAy (ORCPT ); Thu, 3 Oct 2013 09:00:54 -0400 Received: from mga03.intel.com ([143.182.124.21]:51538 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753125Ab3JCNAx (ORCPT ); Thu, 3 Oct 2013 09:00:53 -0400 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga101.ch.intel.com with ESMTP; 03 Oct 2013 06:00:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.90,1026,1371106800"; d="scan'208";a="302666491" Received: from rd-180.fi.intel.com ([10.237.68.49]) by AZSMGA002.ch.intel.com with ESMTP; 03 Oct 2013 06:00:51 -0700 From: Tomasz Bursztyka To: netfilter-devel@vger.kernel.org Cc: Tomasz Bursztyka Subject: [iptables-nftables PATCH v2] xtables: arp: Parse properly target's options Date: Thu, 3 Oct 2013 16:00:47 +0300 Message-Id: <1380805247-12362-1-git-send-email-tomasz.bursztyka@linux.intel.com> X-Mailer: git-send-email 1.8.3.2 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Without this, target never gets its options parsed, so it's a bug. Signed-off-by: Tomasz Bursztyka --- iptables/xtables-arp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c index 8072d90..411a699 100644 --- a/iptables/xtables-arp.c +++ b/iptables/xtables-arp.c @@ -1317,6 +1317,10 @@ int do_commandarp(struct nft_handle *h, int argc, char *argv[], char **table) exit_tryhelp(2); default: + if (target) { + xtables_option_tpcall(c, argv, + invert, target, &fw); + } break; } invert = FALSE; @@ -1325,8 +1329,6 @@ int do_commandarp(struct nft_handle *h, int argc, char *argv[], char **table) if (target) xtables_option_tfcall(target); - /* Fix me: must put inverse options checking here --MN */ - if (optind < argc) xtables_error(PARAMETER_PROBLEM, "unknown arguments found on commandline");