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: Thomas Graf <[EMAIL PROTECTED]>
Index: net-2.6.22/include/linux/fib_rules.h
===================================================================
--- net-2.6.22.orig/include/linux/fib_rules.h 2007-03-27 01:45:56.000000000
+0200
+++ net-2.6.22/include/linux/fib_rules.h 2007-03-27 01:46:33.000000000
+0200
@@ -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 */
Index: net-2.6.22/net/core/fib_rules.c
===================================================================
--- net-2.6.22.orig/net/core/fib_rules.c 2007-03-27 01:46:22.000000000
+0200
+++ net-2.6.22/net/core/fib_rules.c 2007-03-27 01:46:33.000000000 +0200
@@ -146,7 +146,9 @@ jumped:
rule = target;
goto jumped;
}
- } else
+ } else if (rule->action == FR_ACT_NOP)
+ continue;
+ else
err = ops->action(rule, fl, flags, arg);
if (err != -EAGAIN) {
--
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html