Commit fa0b2d1d authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[NET] fib_rules: Add no-operation action

The use of nop rules simplifies the usage of goto rules
and adds more flexibility as they allow targets to remain
while the actual content of the branches can change easly.
Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2b443683
......@@ -54,7 +54,7 @@ enum
FR_ACT_UNSPEC,
FR_ACT_TO_TBL, /* Pass to fixed table */
FR_ACT_GOTO, /* Jump to another rule */
FR_ACT_RES2,
FR_ACT_NOP, /* No operation */
FR_ACT_RES3,
FR_ACT_RES4,
FR_ACT_BLACKHOLE, /* Drop without notification */
......
......@@ -146,7 +146,9 @@ int fib_rules_lookup(struct fib_rules_ops *ops, struct flowi *fl,
rule = target;
goto jumped;
}
} else
} else if (rule->action == FR_ACT_NOP)
continue;
else
err = ops->action(rule, fl, flags, arg);
if (err != -EAGAIN) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment