]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc: don't ignore ok as an action branch
authorJamal Hadi Salim <jhs@mojatatu.com>
Sat, 7 May 2016 13:39:36 +0000 (09:39 -0400)
committerStephen Hemminger <shemming@brocade.com>
Mon, 16 May 2016 18:13:58 +0000 (11:13 -0700)
This is what used to happen before:

tc filter add dev tap1 parent ffff: protocol 0xfefe prio 10 \
     u32 match u32 0 0 flowid 1:16 \
     action ife decode allow mark ok

tc -s filter ls dev tap1 parent ffff:
filter protocol [65278] pref 10 u32
filter protocol [65278] pref 10 u32 fh 800: ht divisor 1
filter protocol [65278] pref 10 u32 fh 800::800 order 2048 key ht 800
bkt 0 flowid 1:16
  match 00000000/00000000 at 0
        action order 1: ife decode action pipe
         index 2 ref 1 bind 1 installed 4 sec used 4 sec
         type: 0x0
         Metadata: allow mark
        Action statistics:
        Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
        backlog 0b 0p requeues 0

        action order 2: gact action pass
         random type none pass val 0
         index 1 ref 1 bind 1 installed 4 sec used 4 sec
        Action statistics:
        Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
        backlog 0b 0p requeues 0

Note the extra action added at the end..

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
tc/m_connmark.c
tc/m_csum.c
tc/m_ife.c
tc/m_mirred.c
tc/m_nat.c
tc/m_pedit.c
tc/m_skbedit.c
tc/m_vlan.c

index b1c7d3af54cc40bece7ce33673c4734c46685700..143d75de66b8b01b02cd0cf68787dcec7054a566 100644 (file)
@@ -99,7 +99,8 @@ parse_connmark(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
                        sel.action = TC_ACT_UNSPEC;
                        argc--;
                        argv++;
-               } else if (matches(*argv, "pass") == 0) {
+               } else if (matches(*argv, "pass") == 0 ||
+                          matches(*argv, "ok") == 0) {
                        sel.action = TC_ACT_OK;
                        argc--;
                        argv++;
index 36181fa1c42af0f33093c1cb9f8d00301facf217..fb1183a983c39ca615c4fcd72c2066c0b0e63c5e 100644 (file)
@@ -140,7 +140,8 @@ parse_csum(struct action_util *a, int *argc_p,
                        sel.action = TC_ACT_UNSPEC;
                        argc--;
                        argv++;
-               } else if (matches(*argv, "pass") == 0) {
+               } else if (matches(*argv, "pass") == 0 ||
+                          matches(*argv, "ok") == 0) {
                        sel.action = TC_ACT_OK;
                        argc--;
                        argv++;
index 839e370af510c8b4c76bc978f13ede626efbed57..ed01ff724999b4b4169bb9da241653892fe6b670 100644 (file)
@@ -167,7 +167,8 @@ static int parse_ife(struct action_util *a, int *argc_p, char ***argv_p,
                        p.action = TC_ACT_UNSPEC;
                        argc--;
                        argv++;
-               } else if (matches(*argv, "pass") == 0) {
+               } else if (matches(*argv, "pass") == 0 ||
+                          matches(*argv, "ok") == 0) {
                        p.action = TC_ACT_OK;
                        argc--;
                        argv++;
index e7e69dfcb7eca66c75451abe2ba7a8576db3f58d..64aad4d22ac90abe3abee5630d7154f659610ba4 100644 (file)
@@ -172,7 +172,8 @@ parse_egress(struct action_util *a, int *argc_p, char ***argv_p,
                } else if (matches(*argv, "continue") == 0) {
                        p.action = TC_POLICE_UNSPEC;
                        NEXT_ARG();
-               } else if (matches(*argv, "pass") == 0) {
+               } else if (matches(*argv, "pass") == 0 ||
+                          matches(*argv, "ok") == 0) {
                        p.action = TC_POLICE_OK;
                        NEXT_ARG();
                }
index 4b90121c4b99e799b63329f045d419f915248a0a..4d1b1edfeeec3898f4a4600fdab872fdbcde250c 100644 (file)
@@ -135,7 +135,8 @@ parse_nat(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struct
                        sel.action = TC_ACT_UNSPEC;
                        argc--;
                        argv++;
-               } else if (matches(*argv, "pass") == 0) {
+               } else if (matches(*argv, "pass") == 0 ||
+                          matches(*argv, "ok") == 0) {
                        sel.action = TC_ACT_OK;
                        argc--;
                        argv++;
index 2a94dfba717579688fa9d68855668f8d3d8e285b..a539b68bd9e27ab5be4b616a69079831eb329376 100644 (file)
@@ -495,7 +495,8 @@ parse_pedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, stru
                } else if (matches(*argv, "continue") == 0) {
                        sel.sel.action = TC_ACT_UNSPEC;
                        NEXT_ARG();
-               } else if (matches(*argv, "pass") == 0) {
+               } else if (matches(*argv, "pass") == 0 ||
+                          matches(*argv, "ok") == 0) {
                        sel.sel.action = TC_ACT_OK;
                        NEXT_ARG();
                }
index 180b9cbd666cc1dd36beb0ac47613b954488f3d4..9ba288c075e08a11aa4fd1a2411678bb32cf003e 100644 (file)
@@ -114,7 +114,8 @@ parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
                } else if (matches(*argv, "continue") == 0) {
                        sel.action = TC_ACT_UNSPEC;
                        NEXT_ARG();
-               } else if (matches(*argv, "pass") == 0) {
+               } else if (matches(*argv, "pass") == 0 ||
+                          matches(*argv, "ok") == 0) {
                        sel.action = TC_ACT_OK;
                        NEXT_ARG();
                }
index 3233d207375bf713a918b807e1f53aaf46800702..c2684461b616aaed07dd4f3b32c49c59e3383de7 100644 (file)
@@ -119,7 +119,8 @@ static int parse_vlan(struct action_util *a, int *argc_p, char ***argv_p,
                        parm.action = TC_ACT_UNSPEC;
                        argc--;
                        argv++;
-               } else if (matches(*argv, "pass") == 0) {
+               } else if (matches(*argv, "pass") == 0 ||
+                          matches(*argv, "ok") == 0) {
                        parm.action = TC_ACT_OK;
                        argc--;
                        argv++;