Browse Source

MT#57371 fix rule deletion

We need to reset the condition flag for each rule, otherwise we may end
up deleting everything

Change-Id: Ic7f827149d18cce9e7b5d8ae5f0145bd52bee12d
pull/1747/head
Richard Fuchs 2 years ago
parent
commit
3823507815
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      daemon/nftables.c

+ 2
- 0
daemon/nftables.c View File

@ -124,6 +124,8 @@ static int nftables_do_rule(const struct nlmsghdr *nlh, void *data) {
if (nftnl_rule_nlmsg_parse(nlh, r) < 0) if (nftnl_rule_nlmsg_parse(nlh, r) < 0)
return MNL_CB_OK; return MNL_CB_OK;
memset(&callbacks->rule_scratch, 0, sizeof(callbacks->rule_scratch));
if (nftnl_expr_foreach(r, callbacks->parse_expr, callbacks) < 0) if (nftnl_expr_foreach(r, callbacks->parse_expr, callbacks) < 0)
return MNL_CB_OK; return MNL_CB_OK;


Loading…
Cancel
Save