From f4b646032acff4d743ad4f734aaca68e9264bdbb Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 24 Jun 2025 18:11:06 +0200 Subject: fib: allow to check if route exists in maps f686a17eafa0 ("fib: Support existence check") adds EXPR_F_BOOLEAN as a workaround to infer from the rhs of the relational expression if the fib lookup wants to check for a specific output interface or, instead, simply check for existence. This, however, does not work with maps. The NFT_FIB_F_PRESENT flag can be used both with NFT_FIB_RESULT_OIF and NFT_FIB_RESULT_OFINAME, my understanding is that they serve the same purpose which is to check if a route exists, so they are redundant. Add a 'check' fib result to check for routes while still keeping the inference workaround for backward compatibility, but prefer the new syntax in the listing. Update man nft(8) and tests/py. Fixes: f686a17eafa0 ("fib: Support existence check") Signed-off-by: Pablo Neira Ayuso --- include/fib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/fib.h b/include/fib.h index 67edccfe..07bb2210 100644 --- a/include/fib.h +++ b/include/fib.h @@ -3,7 +3,7 @@ #include -extern const char *fib_result_str(enum nft_fib_result result); +extern const char *fib_result_str(const struct expr *expr); extern struct expr *fib_expr_alloc(const struct location *loc, unsigned int flags, unsigned int result); -- cgit v1.2.3