]> err.no Git - linux-2.6/commitdiff
[NET] fib_rules: Add no-operation action
authorThomas Graf <tgraf@suug.ch>
Tue, 27 Mar 2007 00:38:53 +0000 (17:38 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:28:14 +0000 (22:28 -0700)
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 <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/fib_rules.h
net/core/fib_rules.c

index c151273293e25186655a574af32de7d2faac18e4..f278ba781d09b2a36a7561976c41c643fee4672f 100644 (file)
@@ -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 7ac602cc8c85a6f1d7a43fe4fbde1d6afea0fe25..5824b2644f26b6d8c3dc4743626b7c1c8050d9dd 100644 (file)
@@ -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) {