Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix
StoreBuilder::inherit_limited_network
(#2541)
* fix `StoreBuilder::inherit_limited_network` Previously, this called `WasiCtxBuilder::inherit_network`, but that had no effect since `StoreBuilder::build_with_data` later overwrites that setting by calling `WasiCtxBuilder::socket_addr_check` with a lambda that uses `StoreBuilder::net_pool` to check addresses. In this cases, `StoreBuilder::net_pool` has not had any subnets added to it, so it denies everything, which is the opposite of what we intended. The solution is to have `StoreBuilder::inherit_limited_network` update `net_pool` to allow all IPv4 and IPv6 networks. Signed-off-by: Joel Dice <joel.dice@fermyon.com> * address review feedback - Rename `StoreBuilder::inherit_limited_network` to `inherit_network` - Add comments explaining use of `Pool` and CIDR addresses Signed-off-by: Joel Dice <joel.dice@fermyon.com> --------- Signed-off-by: Joel Dice <joel.dice@fermyon.com>
- Loading branch information