]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
JSON: Rename mangle statement properties
authorPhil Sutter <phil@nwl.cc>
Wed, 29 Aug 2018 14:23:26 +0000 (16:23 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 30 Aug 2018 10:19:36 +0000 (12:19 +0200)
Instead of the generic "left" and "right", use "key" and "value".

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
26 files changed:
doc/libnftables-json.adoc
src/json.c
src/parser_json.c
tests/py/any/ct.t.json
tests/py/any/ct.t.json.output
tests/py/any/meta.t.json
tests/py/any/meta.t.json.output
tests/py/arp/arp.t.json
tests/py/arp/arp.t.json.output
tests/py/bridge/ether.t.json
tests/py/inet/map.t.json
tests/py/inet/map.t.json.output
tests/py/inet/rt.t.json
tests/py/inet/tcpopt.t.json
tests/py/inet/udp.t.json
tests/py/ip/hash.t.json
tests/py/ip/ip.t.json
tests/py/ip/ip.t.json.output
tests/py/ip/ip_tcp.t.json
tests/py/ip/ip_tcp.t.json.output
tests/py/ip/numgen.t.json
tests/py/ip/numgen.t.json.output
tests/py/ip6/ip6.t.json
tests/py/ip6/ip6.t.json.output
tests/py/ip6/map.t.json
tests/py/ip6/map.t.json.output

index ab11d7dff92a58e5466b3ef3f00e00963e2c788c..309988bcf02afa71a1e56d387ba98c335d16b43f 100644 (file)
@@ -618,15 +618,16 @@ in. The second form specifies a reference to a named counter object.
 === MANGLE
 [verse]
 *{ "mangle": {
-       "left":* 'EXPRESSION'*,
-       "right":* 'EXPRESSION'
+       "key":* 'EXPRESSION'*,
+       "value":* 'EXPRESSION'
 *}}*
 
 Change packet data or meta info.
 
-*left*::
-       Packet data to be changed.
-*right*::
+*key*::
+       Packet data to be changed, given as *exthdr*, *payload*, *meta*, *ct* or
+       *ct helper* expression.
+*value*::
        Value to change data to.
 
 === QUOTA
index 1b596897a8d80624189abcb78a5144b5673bb8cd..4af8ee8ee94f24a1e41c8d303ccb8fa43959fc2d 100644 (file)
@@ -929,15 +929,15 @@ json_t *expr_stmt_json(const struct stmt *stmt, struct output_ctx *octx)
 json_t *payload_stmt_json(const struct stmt *stmt, struct output_ctx *octx)
 {
        return json_pack("{s: {s:o, s:o}}", "mangle",
-                        "left", expr_print_json(stmt->payload.expr, octx),
-                        "right", expr_print_json(stmt->payload.val, octx));
+                        "key", expr_print_json(stmt->payload.expr, octx),
+                        "value", expr_print_json(stmt->payload.val, octx));
 }
 
 json_t *exthdr_stmt_json(const struct stmt *stmt, struct output_ctx *octx)
 {
        return json_pack("{s: {s:o, s:o}}", "mangle",
-                        "left", expr_print_json(stmt->exthdr.expr, octx),
-                        "right", expr_print_json(stmt->exthdr.val, octx));
+                        "key", expr_print_json(stmt->exthdr.expr, octx),
+                        "value", expr_print_json(stmt->exthdr.val, octx));
 }
 
 json_t *quota_stmt_json(const struct stmt *stmt, struct output_ctx *octx)
@@ -973,8 +973,8 @@ json_t *ct_stmt_json(const struct stmt *stmt, struct output_ctx *octx)
        };
 
        return json_pack("{s:{s:o, s:o}}", "mangle",
-                        "left", ct_expr_json(&expr, octx),
-                        "right", expr_print_json(stmt->ct.expr, octx));
+                        "key", ct_expr_json(&expr, octx),
+                        "value", expr_print_json(stmt->ct.expr, octx));
 }
 
 json_t *limit_stmt_json(const struct stmt *stmt, struct output_ctx *octx)
@@ -1051,8 +1051,8 @@ json_t *meta_stmt_json(const struct stmt *stmt, struct output_ctx *octx)
        root = json_pack("{s:{s:s}}", "meta",
                         "key", meta_templates[stmt->meta.key].token);
        root = json_pack("{s:o, s:o}",
-                        "left", root,
-                        "right", expr_print_json(stmt->meta.expr, octx));
+                        "key", root,
+                        "value", expr_print_json(stmt->meta.expr, octx));
 
        return json_pack("{s:o}", "mangle", root);
 }
index 1bb4f1f1de531f6ebf5cde042b7f8de33c0ccbfb..2f7e0a3e38ae5be0469ba63af1a5c0c6c938593e 100644 (file)
@@ -1441,50 +1441,50 @@ static struct stmt *json_parse_verdict_stmt(struct json_ctx *ctx,
 }
 
 static struct stmt *json_parse_mangle_stmt(struct json_ctx *ctx,
-                                       const char *key, json_t *value)
+                                       const char *type, json_t *root)
 {
-       json_t *jleft, *jright;
-       struct expr *left, *right;
+       json_t *jkey, *jvalue;
+       struct expr *key, *value;
        struct stmt *stmt;
 
-       if (json_unpack_err(ctx, value, "{s:o, s:o}",
-                          "left", &jleft, "right", &jright))
+       if (json_unpack_err(ctx, root, "{s:o, s:o}",
+                          "key", &jkey, "value", &jvalue))
                return NULL;
 
-       left = json_parse_mangle_lhs_expr(ctx, jleft);
-       if (!left) {
-               json_error(ctx, "Invalid LHS of mangle statement");
+       key = json_parse_mangle_lhs_expr(ctx, jkey);
+       if (!key) {
+               json_error(ctx, "Invalid mangle statement key");
                return NULL;
        }
-       right = json_parse_stmt_expr(ctx, jright);
-       if (!right) {
-               json_error(ctx, "Invalid RHS of mangle statement");
-               expr_free(left);
+       value = json_parse_stmt_expr(ctx, jvalue);
+       if (!value) {
+               json_error(ctx, "Invalid mangle statement value");
+               expr_free(key);
                return NULL;
        }
 
-       switch (left->ops->type) {
+       switch (key->ops->type) {
        case EXPR_EXTHDR:
-               return exthdr_stmt_alloc(int_loc, left, right);
+               return exthdr_stmt_alloc(int_loc, key, value);
        case EXPR_PAYLOAD:
-               return payload_stmt_alloc(int_loc, left, right);
+               return payload_stmt_alloc(int_loc, key, value);
        case EXPR_META:
-               stmt = meta_stmt_alloc(int_loc, left->meta.key, right);
-               expr_free(left);
+               stmt = meta_stmt_alloc(int_loc, key->meta.key, value);
+               expr_free(key);
                return stmt;
        case EXPR_CT:
-               if (left->ct.key == NFT_CT_HELPER) {
+               if (key->ct.key == NFT_CT_HELPER) {
                        stmt = objref_stmt_alloc(int_loc);
                        stmt->objref.type = NFT_OBJECT_CT_HELPER;
-                       stmt->objref.expr = right;
+                       stmt->objref.expr = value;
                } else {
-                       stmt = ct_stmt_alloc(int_loc, left->ct.key,
-                                            left->ct.direction, right);
+                       stmt = ct_stmt_alloc(int_loc, key->ct.key,
+                                            key->ct.direction, value);
                }
-               expr_free(left);
+               expr_free(key);
                return stmt;
        default:
-               json_error(ctx, "Invalid LHS expression type for mangle statement.");
+               json_error(ctx, "Invalid mangle statement key expression type.");
                return NULL;
        }
 }
index 8e3127957b00cfaa8c8401e1f0bed40d3b3e8d13..2fb4e7270c9747affff319429d1a9b8f73a4c119 100644 (file)
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": { "^": [ "0x11", "0x1331" ] }
+            "value": { "^": [ "0x11", "0x1331" ] }
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": { "&": [ "0x11333", "0x11" ] }
+            "value": { "&": [ "0x11333", "0x11" ] }
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": { "|": [ "0x12", "0x11" ] }
+            "value": { "|": [ "0x12", "0x11" ] }
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": "0x11"
+            "value": "0x11"
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": {
+            "value": {
                 "meta": { "key": "mark" }
             }
         }
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": {
+            "value": {
                 "map": {
                     "key": {
                         "meta": { "key": "mark" }
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "event"
                 }
             },
-            "right": "new"
+            "value": "new"
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "event"
                 }
             },
-            "right": [
+            "value": [
                 "new",
                 "related",
                 "destroy",
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "event"
                 }
             },
-            "right": [
+            "value": [
                 "new",
                 "related",
                 "destroy",
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "event"
                 }
             },
-            "right": [
+            "value": [
                 "new",
                 "destroy"
             ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "event"
                 }
             },
-            "right": 1
+            "value": 1
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "event"
                 }
             },
-            "right": "0x0"
+            "value": "0x0"
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "label"
                 }
             },
-            "right": 127
+            "value": 127
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "zone"
                 }
             },
-            "right": 1
+            "value": 1
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "dir": "original",
                     "key": "zone"
                 }
             },
-            "right": 1
+            "value": 1
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "dir": "reply",
                     "key": "zone"
                 }
             },
-            "right": 1
+            "value": 1
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "zone"
                 }
             },
-            "right": {
+            "value": {
                 "map": {
                     "key": {
                         "meta": { "key": "mark" }
index eb11ecc4f92171cffa37bdfc127ad68c52da43d9..8f0ca93c134270a14f7ada3c415e8ee129ca84f6 100644 (file)
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": 4896
+            "value": 4896
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": 17
+            "value": 17
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": 19
+            "value": 19
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": 17
+            "value": 17
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "event"
                 }
             },
-            "right": "new"
+            "value": "new"
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "event"
                 }
             },
-            "right": 0
+            "value": 0
         }
     }
 ]
index 9149b641ef6a8f881e78034de5c123c89c43d22a..00a4f237ce71206b092dac96ae4fb470783029c3 100644 (file)
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "priority" }
             },
-            "right": "cafe:beef"
+            "value": "cafe:beef"
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": { "^": [ "0xffffffc8", "0x16" ] }
+            "value": { "^": [ "0xffffffc8", "0x16" ] }
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": { "&": [ "0x16", "0x16" ] }
+            "value": { "&": [ "0x16", "0x16" ] }
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": { "|": [ "0xffffffe9", "0x16" ] }
+            "value": { "|": [ "0xffffffe9", "0x16" ] }
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": { "&": [ "0xffffffde", "0x16" ] }
+            "value": { "&": [ "0xffffffde", "0x16" ] }
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": { "|": [ "0xf045ffde", "0x10" ] }
+            "value": { "|": [ "0xf045ffde", "0x10" ] }
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": { "|": [ "0xffffffde", "0x16" ] }
+            "value": { "|": [ "0xffffffde", "0x16" ] }
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": { "|": [ "0x32", "0xfffff" ] }
+            "value": { "|": [ "0x32", "0xfffff" ] }
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": { "^": [ "0xfffe", "0x16" ] }
+            "value": { "^": [ "0xfffe", "0x16" ] }
         }
     }
 ]
index 682ad684a17204b39e67f1fb2c6cf30875bab289..398583f444d3c2b85ee04fdb1d2c1127fcc7dcf7 100644 (file)
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": 4294967262
+            "value": 4294967262
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": 22
+            "value": 22
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": 4294967295
+            "value": 4294967295
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": 22
+            "value": 22
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": 4031119326
+            "value": 4031119326
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": 4294967262
+            "value": 4294967262
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": 1048575
+            "value": 1048575
         }
     }
 ]
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": 65512
+            "value": 65512
         }
     }
 ]
index 49f5c2ca22ef4353cd352781fc6ca7a3134f900b..7f5c3ca2546365dcea402a91ff62473f36198378 100644 (file)
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "base": "nh",
                     "len": 48,
                     "offset": 144
                 }
             },
-            "right": "0x112233445566"
+            "value": "0x112233445566"
         }
     }
 ]
index 295d05fa700fe23187a3dfd7aab168298dec3549..7ee4dbfaa6668d845b428b5989f7e1c45bccb1c7 100644 (file)
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "base": "nh",
                     "len": 48,
                     "offset": 144
                 }
             },
-            "right": 18838586676582
+            "value": 18838586676582
         }
     }
 ]
index 136a22cac0787d062acd621f7351c0df546209d7..d9a0066bec3eb9aef37444f27e676b3edf981de6 100644 (file)
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "saddr",
                     "protocol": "ether"
                 }
             },
-            "right": "ff:fe:dc:ba:98:76"
+            "value": "ff:fe:dc:ba:98:76"
         }
     },
     {
index 207ac3f3f0c735c5d0f6024e7e5eacc8039072f5..1cb28e016eb4d7237e6d75911113fce23c511a63 100644 (file)
@@ -2,10 +2,10 @@
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": {
+            "value": {
                 "map": {
                     "key": {
                         "payload": {
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": {
+            "value": {
                 "map": {
                     "key": {
                         "payload": {
index 9c235e3060b0c722d429dfa39a552fc7379a4612..b0bb7ddf91d05282c7b868ac81b874437679a17d 100644 (file)
@@ -2,10 +2,10 @@
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": {
+            "value": {
                 "map": {
                     "key": {
                         "payload": {
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": {
+            "value": {
                 "map": {
                     "key": {
                         "payload": {
index 92f2dbeafe6005f1ad2cbf5348710624e6fe00da..e81bcfd83270e2a0712c3b870c9ac1a40f44bed4 100644 (file)
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "tcp option": {
                     "field": "size",
                     "name": "maxseg"
                 }
             },
-            "right": {
+            "value": {
                 "rt": {
                     "key": "mtu"
                 }
index d4632187496c22a60a71b86796a48cd33a1d1a98..431ee0212c91a3857c0c091c23ff0552db5bbe2a 100644 (file)
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "tcp option": {
                     "field": "size",
                     "name": "maxseg"
                 }
             },
-            "right": 1360
+            "value": 1360
         }
     }
 ]
index 896d20d8acd2e2e55558cf53bed0fc679d73709f..5ea073d7042b0718dc07c1ea4f60169ad19a3e06 100644 (file)
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "checksum",
                     "protocol": "udp"
                 }
             },
-            "right": 0
+            "value": 0
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "dport",
                     "protocol": "udp"
                 }
             },
-            "right": 65535
+            "value": 65535
         }
     }
 ]
index febf02740ccc0da88add682302a9f3baa3fff77e..a95cf22f24ce50379b22241b978bfab6933c0ce9 100644 (file)
@@ -2,12 +2,12 @@
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": {
+            "value": {
                 "jhash": {
                     "expr": {
                         "concat": [
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": {
+            "value": {
                 "jhash": {
                     "expr": {
                         "concat": [
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": {
+            "value": {
                 "jhash": {
                     "expr": {
                         "concat": [
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": {
+            "value": {
                 "jhash": {
                     "expr": {
                         "concat": [
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": {
+            "value": {
                 "jhash": {
                     "expr": {
                         "concat": [
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": {
+            "value": {
                 "symhash": {
                     "mod": 2,
                     "offset": 100
index 3e4f2d8027cce574901b9b15198222653744c7e0..c8b2bf83d95cfafcc4e4e45ade80e335de35ef5a 100644 (file)
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "daddr",
                     "protocol": "ip"
                 }
             },
-            "right": "127.0.0.1"
+            "value": "127.0.0.1"
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "checksum",
                     "protocol": "ip"
                 }
             },
-            "right": 0
+            "value": 0
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "id",
                     "protocol": "ip"
                 }
             },
-            "right": 0
+            "value": 0
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "ecn",
                     "protocol": "ip"
                 }
             },
-            "right": 1
+            "value": 1
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "ecn",
                     "protocol": "ip"
                 }
             },
-            "right": "ce"
+            "value": "ce"
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "ttl",
                     "protocol": "ip"
                 }
             },
-            "right": 23
+            "value": 23
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "protocol",
                     "protocol": "ip"
                 }
             },
-            "right": 1
+            "value": 1
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "dscp",
                     "protocol": "ip"
                 }
             },
-            "right": "af23"
+            "value": "af23"
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "dscp",
                     "protocol": "ip"
                 }
             },
-            "right": "cs0"
+            "value": "cs0"
         }
     }
 ]
index 22b4d8c95e515fa45bd0a8bf09b7ae9c2d76aa41..0378c00ffda77a043fe3cacd76463cdaffdb3bf4 100644 (file)
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "ecn",
                     "protocol": "ip"
                 }
             },
-            "right": "ect1"
+            "value": "ect1"
         }
     }
 ]
index 453c1e43120295cc75a2142df28489df3bd4be30..15b5f386ba69a68f12fd96af9f708c80697569be 100644 (file)
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": 1
+            "value": 1
         }
     },
     {
index 15bd8e11a30453bf725a1bda4df198a5e5dbd9b1..63cdfe0bc536b049af39a26eedc46fdb7328321f 100644 (file)
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": 1
+            "value": 1
         }
     },
     {
index 5318a0f539b7c21f7bd0ccf313aabd9d540c9556..9902c2cf905ef7fb7bf8b4648f2fabc87023d7ea 100644 (file)
@@ -2,12 +2,12 @@
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": {
+            "value": {
                 "numgen": {
                     "mod": 2,
                     "mode": "inc"
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": {
+            "value": {
                 "numgen": {
                     "mod": 2,
                     "mode": "inc",
index ffab43bae453636c28b0471afbe4d5a2f18f3e8d..b54121ca0f721d688dc3259d7bb1efbe807908c3 100644 (file)
@@ -2,12 +2,12 @@
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "ct": {
                     "key": "mark"
                 }
             },
-            "right": {
+            "value": {
                 "numgen": {
                     "mod": 2,
                     "mode": "inc",
index a0a3079a8a940a6a53e02fd2b943c0d07e662e67..d6acaa3b7d357806f77610e7e178fa37b3680bd4 100644 (file)
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "daddr",
                     "protocol": "ip6"
                 }
             },
-            "right": "::1"
+            "value": "::1"
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "hoplimit",
                     "protocol": "ip6"
                 }
             },
-            "right": 1
+            "value": 1
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "dscp",
                     "protocol": "ip6"
                 }
             },
-            "right": "af42"
+            "value": "af42"
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "dscp",
                     "protocol": "ip6"
                 }
             },
-            "right": 63
+            "value": 63
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "ecn",
                     "protocol": "ip6"
                 }
             },
-            "right": "ect0"
+            "value": "ect0"
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "ecn",
                     "protocol": "ip6"
                 }
             },
-            "right": "ce"
+            "value": "ce"
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "flowlabel",
                     "protocol": "ip6"
                 }
             },
-            "right": 0
+            "value": 0
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "flowlabel",
                     "protocol": "ip6"
                 }
             },
-            "right": 12345
+            "value": 12345
         }
     }
 ]
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "flowlabel",
                     "protocol": "ip6"
                 }
             },
-            "right": "0xfffff"
+            "value": "0xfffff"
         }
     }
 ]
index 2b8147216a20d83f013c6fc130b32efc37e3c367..48f28b3d6e17ae1f0ba0468a1840ef771b54d91f 100644 (file)
     },
     {
         "mangle": {
-            "left": {
+            "key": {
                 "payload": {
                     "field": "flowlabel",
                     "protocol": "ip6"
                 }
             },
-            "right": 1048575
+            "value": 1048575
         }
     }
 ]
index 2ddb3080d5844c891785542554273480ca598292..78a01c6baa9c4f619fd51bf19e41ce4b6eba47dd 100644 (file)
@@ -2,10 +2,10 @@
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": {
+            "value": {
                 "map": {
                     "key": {
                         "&": [
index 84343763b98fef7433aecb4e761d78486f78796e..9280d55e078874f727713733903719d8435af07c 100644 (file)
@@ -2,10 +2,10 @@
 [
     {
         "mangle": {
-            "left": {
+            "key": {
                 "meta": { "key": "mark" }
             },
-            "right": {
+            "value": {
                 "map": {
                     "key": {
                         "&": [