Displaying 2 results from an estimated 2 matches for "payload_expr".
2018 Feb 15
3
[Bug 1226] New: Segmentation fault when printing a rule checking byte zero of NFT_PAYLOAD_LL_HEADER
...trying to print 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");
nft...
2019 Jun 19
2
[Bug 1344] New: Segmentation fault in nft add rule ip ipv4table ipv4chain-1 tcp sport { 12345-54321 }
...59 151
Entering state 529
Reducing stack by rule 808 (line 3934):
$1 = token "tcp" (: )
$2 = nterm tcp_hdr_field (: )
-> $$ = nterm tcp_hdr_expr (: )
Stack now 0 1 19 12 59
Entering state 218
Reducing stack by rule 723 (line 3754):
$1 = nterm tcp_hdr_expr (: )
-> $$ = nterm payload_expr (: )
Stack now 0 1 19 12 59
Entering state 333
Reading a token: --accepting rule at line 631 (" ")
--accepting rule at line 209 ("{")
Next token is token '{' (: )
Reducing stack by rule 477 (line 2898):
$1 = nterm payload_expr (: )
-> $$ = nterm primary_expr (: )
S...