From: Gao feng <gaofeng@cn.fujitsu.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH 2/3] Add MARK target for arptables
Date: Wed, 11 Feb 2015 16:58:20 +0800 [thread overview]
Message-ID: <54DB19AC.6010107@cn.fujitsu.com> (raw)
In-Reply-To: <20150210231852.GA3715@salvia>
On 02/11/2015 07:18 AM, Pablo Neira Ayuso wrote:
> On Fri, Feb 06, 2015 at 03:26:29PM +0800, Gao feng wrote:
>> We can use MARK target to set make value for
>> arp packet.
>>
>> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
>> ---
>> extensions/Makefile | 2 +-
>> extensions/arpt_MARK.c | 119 +++++++++++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 120 insertions(+), 1 deletion(-)
>> create mode 100644 extensions/arpt_MARK.c
>>
>> diff --git a/extensions/Makefile b/extensions/Makefile
>> index 09b244e..0189cc9 100644
>> --- a/extensions/Makefile
>> +++ b/extensions/Makefile
>> @@ -1,6 +1,6 @@
>> #! /usr/bin/make
>>
>> -EXT_FUNC+=standard mangle CLASSIFY
>> +EXT_FUNC+=standard mangle CLASSIFY MARK
>> EXT_OBJS+=$(foreach T,$(EXT_FUNC), extensions/arpt_$(T).o)
>>
>> extensions/ebt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h
>> diff --git a/extensions/arpt_MARK.c b/extensions/arpt_MARK.c
>> new file mode 100644
>> index 0000000..ce24bdb
>> --- /dev/null
>> +++ b/extensions/arpt_MARK.c
>> @@ -0,0 +1,119 @@
>> +/*
>> + * (C) 2015 by Gao feng <gaofeng@cn.fujitsu.com>
>> + *
>> + * arpt_MARK.c -- arptables extension to set mark for arp packet
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
>> + * GNU General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU General Public License
>> + * along with this program; if not, write to the Free Software
>> + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
>> + */
>> +
>> +#include <stdio.h>
>> +#include <getopt.h>
>> +#include <arptables.h>
>> +#include <linux/netfilter/xt_mark.h>
>> +#include <linux/netfilter/x_tables.h>
>> +
>> +static void
>> +help(void)
>> +{
>> + printf(
>> +"MARK target v%s options:\n"
>> +"--set-mark mark : set the mark value\n",
>> + ARPTABLES_VERSION);
>> +}
>> +
>> +#define MARK_OPT 1
>> +
>> +static struct option opts[] = {
>> + { "set-mark" , required_argument, 0, MARK_OPT },
>> + {0}
>
> Please, add all options that MARK support according to man
> iptables-extensions.
Get, will do. thanks!
next prev parent reply other threads:[~2015-02-11 8:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-06 7:26 [PATCH 1/3] Add revision field for xt_entry_target Gao feng
2015-02-06 7:26 ` [PATCH 2/3] Add MARK target for arptables Gao feng
2015-02-10 23:18 ` Pablo Neira Ayuso
2015-02-11 8:58 ` Gao feng [this message]
2015-02-06 7:26 ` [PATCH 3/3] Update the manpage for MARK target Gao feng
2015-02-11 15:52 ` [PATCH 1/3] Add revision field for xt_entry_target Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54DB19AC.6010107@cn.fujitsu.com \
--to=gaofeng@cn.fujitsu.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).