Needed for VNET+
authorSapan Bhatia <sapanb@cs.princeton.edu>
Thu, 16 Aug 2007 00:25:01 +0000 (00:25 +0000)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Thu, 16 Aug 2007 00:25:01 +0000 (00:25 +0000)
extensions/libipt_MARK.c
include/linux/netfilter_ipv4/ipt_MARK.h

index 457f6ad..dd7bbaf 100644 (file)
@@ -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;
        }
index 3694e48..adc1a26 100644 (file)
@@ -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 {