From b6620c271722d614b5aac1cdc425fb1a0d8a5ad0 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Thu, 16 Aug 2007 00:25:01 +0000 Subject: [PATCH] Needed for VNET+ --- extensions/libipt_MARK.c | 5 +++++ include/linux/netfilter_ipv4/ipt_MARK.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/extensions/libipt_MARK.c b/extensions/libipt_MARK.c index 457f6ad..dd7bbaf 100644 --- a/extensions/libipt_MARK.c +++ b/extensions/libipt_MARK.c @@ -18,6 +18,7 @@ help(void) " --set-mark value Set nfmark value\n" " --and-mark value Binary AND the nfmark with value\n" " --or-mark value Binary OR the nfmark with value\n" +" --copy-xid Set nfmark to be the connection xid (PlanetLab specific)\n" "\n", IPTABLES_VERSION); } @@ -26,6 +27,7 @@ static struct option opts[] = { { "set-mark", 1, 0, '1' }, { "and-mark", 1, 0, '2' }, { "or-mark", 1, 0, '3' }, + { "copy-xid", 1, 0, '4' }, { 0 } }; @@ -102,6 +104,9 @@ parse_v1(int c, char **argv, int invert, unsigned int *flags, case '3': markinfo->mode = IPT_MARK_OR; break; + case '4': + markinfo->mode = IPT_MARK_COPYXID; + break; default: return 0; } diff --git a/include/linux/netfilter_ipv4/ipt_MARK.h b/include/linux/netfilter_ipv4/ipt_MARK.h index 3694e48..adc1a26 100644 --- a/include/linux/netfilter_ipv4/ipt_MARK.h +++ b/include/linux/netfilter_ipv4/ipt_MARK.h @@ -12,7 +12,8 @@ struct ipt_mark_target_info { enum { IPT_MARK_SET=0, IPT_MARK_AND, - IPT_MARK_OR + IPT_MARK_OR, + IPT_MARK_COPYXID }; struct ipt_mark_target_info_v1 { -- 2.43.0