summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/expression.c1
-rw-r--r--src/osf.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/src/expression.c b/src/expression.c
index 191bc2be..7d198222 100644
--- a/src/expression.c
+++ b/src/expression.c
@@ -1230,6 +1230,7 @@ const struct expr_ops *expr_ops_by_type(enum expr_types etype)
case EXPR_EXTHDR: return &exthdr_expr_ops;
case EXPR_META: return &meta_expr_ops;
case EXPR_SOCKET: return &socket_expr_ops;
+ case EXPR_OSF: return &osf_expr_ops;
default:
break;
}
diff --git a/src/osf.c b/src/osf.c
index f0c22393..cb58315d 100644
--- a/src/osf.c
+++ b/src/osf.c
@@ -37,6 +37,17 @@ static bool osf_expr_cmp(const struct expr *e1, const struct expr *e2)
(e1->osf.flags == e2->osf.flags);
}
+static int osf_expr_build_udata(struct nftnl_udata_buf *udbuf,
+ const struct expr *expr)
+{
+ return 0;
+}
+
+static struct expr *osf_expr_parse_udata(const struct nftnl_udata *attr)
+{
+ return osf_expr_alloc(&internal_location, 0, 0);
+}
+
const struct expr_ops osf_expr_ops = {
.type = EXPR_OSF,
.name = "osf",
@@ -44,6 +55,8 @@ const struct expr_ops osf_expr_ops = {
.clone = osf_expr_clone,
.cmp = osf_expr_cmp,
.json = osf_expr_json,
+ .parse_udata = osf_expr_parse_udata,
+ .build_udata = osf_expr_build_udata,
};
struct expr *osf_expr_alloc(const struct location *loc, const uint8_t ttl,