Commit Graph

4 Commits

Author SHA1 Message Date
Paul Holzinger 70ce08ed1e libnetwork/util: add GetLocalIPExcluding()
For some cases it may be required to get a local ip while excluding a
certain ip. This will be used to set a better host.containers.internal
name for pasta networks as it is likely that host eth0 ip == container
ip so in this case we must use different host ip.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-15 11:54:23 +01:00
Paul Holzinger fe4bcb14bf libnetwork/util: export GetLocalIP()
I want to use this function in both podman and buildah, move it to the
util package as it is not specific to etchosts and export it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-14 14:16:58 +02:00
Paul Holzinger 4fcb18dca7 libnetwork: fix lint errors
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-17 14:24:21 +01:00
Paul Holzinger 002673d22f add libnetwork package
Copy the libpod/network packages from podman to here so we can use the
same code in buildah as well.

This is mostly a one to one copy only the import paths have been changed
and some errors were added.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-16 19:07:38 +01:00