Commit d38ee2fa authored by Jan Maria Matejka's avatar Jan Maria Matejka

TMP

parent b7bf0d6c
Pipeline #22131 failed with stages
in 17 minutes and 36 seconds
......@@ -46,8 +46,6 @@
#include "conf/conf.h"
#include "filter/filter.h"
#define P(a,b) ((a<<8) | b)
#define CMP_ERROR 999
static struct adata *
......@@ -591,9 +589,7 @@ static struct tbf rl_runtime_err = TBF_DEFAULT_LOG_LIMITS;
#define runtime(x) do { \
log_rl(&rl_runtime_err, L_ERR "filters, line %d: %s", what->lineno, x); \
res.type = T_RETURN; \
res.val.i = F_ERROR; \
return res; \
return (struct f_val) { .type = T_RETURN; .val.i = F_ERROR; }; \
} while(0)
struct filter_instruction {
......@@ -611,22 +607,7 @@ static struct filter_instruction filter_instruction[] = {
FI__LIST
};
#define ARG(x,y) \
x = interpret(what->y); \
if (x.type & T_RETURN) \
return x;
#define ONEARG ARG(v1, a1.p)
#define TWOARGS ARG(v1, a1.p) \
ARG(v2, a2.p)
#define TWOARGS_C TWOARGS \
if (v1.type != v2.type) \
runtime( "Can't operate with values of incompatible types" );
#define ACCESS_RTE \
do { if (!f_rte) runtime("No route to access"); } while (0)
#define BITFIELD_MASK(what) \
(1u << (what->a2.i >> 24))
#include "filter/interpret.h"
/**
* interpret
......
......@@ -261,11 +261,14 @@ void val_format(struct f_val v, buffer *buf);
#define T_LC 0x28 /* Large community value, lcomm */
#define T_LCLIST 0x29 /* Large community list */
#define T_TYPE 0x2f /* T_* internal type value */
#define T_RETURN 0x40
#define T_SET 0x80
#define T_PREFIX_SET 0x81
#define SA_FROM 1
#define SA_GW 2
#define SA_NET 3
......
This diff is collapsed.
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