Skip to content

Conversation

linear0211
Copy link
Contributor

--addr-pool=<addr/mask> Grant wasi access to the given network addresses in
CIDR notation to the program, separated with ',',
for example:
--addr-pool=1.2.3.4/15,2.3.4.5/16

The docs say --addr-pool accepts multiple comma-separated CIDR addresses, but only the first two are currently parsed.
This changes the delimiter to , to match the documentation.

For example, using the code from samples/socket-api.

$ ./iwasm --addr-pool=1.1.1.1/32,2.2.2.2/32,0.0.0.0/15 tcp_server.wasm 
[Server] Create socket
Bind failed: Permission denied
[Server] Bind socket
[Server] Shutting down ..

Copy link
Collaborator

@lum1n0us lum1n0us left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT

@loganek Please help us to confirm that.

@lum1n0us lum1n0us added the bug-fix Determine if this PR addresses a bug. It will be used by scripts to classify PRs. label Aug 1, 2025
@lum1n0us lum1n0us merged commit b00ff11 into bytecodealliance:main Aug 4, 2025
453 checks passed
@linear0211 linear0211 deleted the fix-addr-pool-multiple-ips branch August 4, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Determine if this PR addresses a bug. It will be used by scripts to classify PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants