search for: nftnl_rule_set

Displaying 1 result from an estimated 1 matches for "nftnl_rule_set".

2018 Feb 15
3
[Bug 1226] New: Segmentation fault when printing a rule checking byte zero of NFT_PAYLOAD_LL_HEADER
...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_u32(rule, NFTNL_RULE_FAMILY, NFPROTO_INET); payload_expr = nftnl_expr_alloc("payload"); nftnl_expr_set_u32(payload_expr, NFTNL_EXPR_PAYLOAD_BASE, N...