Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -54,7 +54,7 @@ enum
	FR_ACT_UNSPEC,
	FR_ACT_UNSPEC,
	FR_ACT_TO_TBL,		/* Pass to fixed table */
	FR_ACT_TO_TBL,		/* Pass to fixed table */
	FR_ACT_GOTO,		/* Jump to another rule */
	FR_ACT_GOTO,		/* Jump to another rule */
	FR_ACT_RES2,
	FR_ACT_NOP,		/* No operation */
	FR_ACT_RES3,
	FR_ACT_RES3,
	FR_ACT_RES4,
	FR_ACT_RES4,
	FR_ACT_BLACKHOLE,	/* Drop without notification */
	FR_ACT_BLACKHOLE,	/* Drop without notification */
+3 −1
Original line number Original line Diff line number Diff line
@@ -146,7 +146,9 @@ int fib_rules_lookup(struct fib_rules_ops *ops, struct flowi *fl,
				rule = target;
				rule = target;
				goto jumped;
				goto jumped;
			}
			}
		} else
		} else if (rule->action == FR_ACT_NOP)
			continue;
		else
			err = ops->action(rule, fl, flags, arg);
			err = ops->action(rule, fl, flags, arg);


		if (err != -EAGAIN) {
		if (err != -EAGAIN) {