Fix to remove rule with correct handle.
This commit is contained in:
parent
9e10d91347
commit
050845156a
|
@ -159,6 +159,7 @@ delete_redirect_and_filter_rules(unsigned short eport, int proto)
|
||||||
r = rule_del_handle(p);
|
r = rule_del_handle(p);
|
||||||
/* Todo: send bulk request */
|
/* Todo: send bulk request */
|
||||||
nft_send_request(r, NFT_MSG_DELRULE);
|
nft_send_request(r, NFT_MSG_DELRULE);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1034,7 +1034,7 @@ rule_del_handle(rule_t *rule)
|
||||||
nft_rule_attr_set(r, NFT_RULE_ATTR_TABLE, rule->table);
|
nft_rule_attr_set(r, NFT_RULE_ATTR_TABLE, rule->table);
|
||||||
nft_rule_attr_set(r, NFT_RULE_ATTR_CHAIN, rule->chain);
|
nft_rule_attr_set(r, NFT_RULE_ATTR_CHAIN, rule->chain);
|
||||||
nft_rule_attr_set_u32(r, NFT_RULE_ATTR_FAMILY, rule->family);
|
nft_rule_attr_set_u32(r, NFT_RULE_ATTR_FAMILY, rule->family);
|
||||||
nft_rule_attr_set_u64(r, NFT_RULE_ATTR_POSITION, rule->handle);
|
nft_rule_attr_set_u64(r, NFT_RULE_ATTR_HANDLE, rule->handle);
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue