Displaying 1 result from an estimated 1 matches for "cmp_expr".
Did you mean:
cmdexpr
2018 Feb 15
3
[Bug 1226] New: Segmentation fault when printing a rule checking byte zero of NFT_PAYLOAD_LL_HEADER
...it. The rule itself is probably very invalid, but
nft should likely not segfault when printing it.
# Rule that triggers the segfault:
This is how to create the rule from C using libnftnl:
static struct nftnl_rule *setup_rule()
{
struct nftnl_rule *rule;
struct nftnl_expr *payload_expr, *cmp_expr;
uint8_t mac[6] = {0, 0, 0, 0, 0, 0};
rule = nftnl_rule_alloc();
// The segfault is only triggered if the rule is an NFPROTO_INET rule.
nftnl_rule_set(rule, NFTNL_RULE_TABLE, "my_table");
nftnl_rule_set(rule, NFTNL_RULE_CHAIN, "my_chain");
nftnl_rule_set...