aboutgitcodebugslistschat
path: root/tcp.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-10-07 04:53:40 +0200
committerStefano Brivio <sbrivio@redhat.com>2022-10-15 02:10:36 +0200
commitc1eff9a3c622516c7bb9194a1df50dfe01281c56 (patch)
tree01dc155f0b38022a511f37e3760b0844ffa195e2 /tcp.h
parenta62ed181db9ba7d85d057365d5331dd35026247f (diff)
downloadpasst-c1eff9a3c622516c7bb9194a1df50dfe01281c56.tar
passt-c1eff9a3c622516c7bb9194a1df50dfe01281c56.tar.gz
passt-c1eff9a3c622516c7bb9194a1df50dfe01281c56.tar.bz2
passt-c1eff9a3c622516c7bb9194a1df50dfe01281c56.tar.lz
passt-c1eff9a3c622516c7bb9194a1df50dfe01281c56.tar.xz
passt-c1eff9a3c622516c7bb9194a1df50dfe01281c56.tar.zst
passt-c1eff9a3c622516c7bb9194a1df50dfe01281c56.zip
conf, tcp, udp: Allow specification of interface to bind to
Since kernel version 5.7, commit c427bfec18f2 ("net: core: enable SO_BINDTODEVICE for non-root users"), we can bind sockets to interfaces, if they haven't been bound yet (as in bind()). Introduce an optional interface specification for forwarded ports, prefixed by %, that can be passed together with an address. Reported use case: running local services that use ports we want to have externally forwarded: https://github.com/containers/podman/issues/14425 Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tcp.h')
-rw-r--r--tcp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcp.h b/tcp.h
index 2548d4d..7ba7ab7 100644
--- a/tcp.h
+++ b/tcp.h
@@ -21,7 +21,7 @@ void tcp_sock_handler(struct ctx *c, union epoll_ref ref, uint32_t events,
int tcp_tap_handler(struct ctx *c, int af, const void *addr,
const struct pool *p, const struct timespec *now);
void tcp_sock_init(const struct ctx *c, int ns, sa_family_t af,
- const void *addr, in_port_t port);
+ const void *addr, const char *ifname, in_port_t port);
int tcp_init(struct ctx *c);
void tcp_timer(struct ctx *c, const struct timespec *ts);
void tcp_defer_handler(struct ctx *c);