diff options
author | Sascha Grunert <sgrunert@suse.com> | 2020-10-16 10:57:29 +0200 |
---|---|---|
committer | Sascha Grunert <sgrunert@suse.com> | 2020-10-19 11:19:12 +0200 |
commit | 49424fc02aaa3fa7d233e011d0e5f2589d2e09ac (patch) | |
tree | 0c9cec89f0466b31097b29c2153c510e1f4d2ca2 /vendor/go.etcd.io/bbolt/bolt_openbsd.go | |
parent | c3ecdd09ed6a9b17da9879d7f2765a6f5f3ace8a (diff) | |
download | podman-49424fc02aaa3fa7d233e011d0e5f2589d2e09ac.tar.gz podman-49424fc02aaa3fa7d233e011d0e5f2589d2e09ac.tar.bz2 podman-49424fc02aaa3fa7d233e011d0e5f2589d2e09ac.zip |
Fix host to container port mapping for simple ranges
This fixes the issue that a simple port range should map to a random
port range from the host to the container, if no host port range is
specified. For example this fails without applying the patch:
```
> podman run -it -p 6000-6066 alpine
Error: cannot listen on the TCP port: listen tcp4 :53: bind: address already in use
```
The issue is that only the first port is randomly chosen and all
following in the range start by 0 and increment. This is now fixed by
tracking the ranges and then incrementing the random port if necessary.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'vendor/go.etcd.io/bbolt/bolt_openbsd.go')
0 files changed, 0 insertions, 0 deletions