Fix to remove rule with correct handle.

This commit is contained in:
Tomofumi Hayashi 2015-03-16 19:58:02 +09:00
parent 9e10d91347
commit 050845156a
2 changed files with 2 additions and 1 deletions

View File

@ -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;
} }
} }

View File

@ -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;
} }