diff options
author | Maria Matejka <mq@ucw.cz> | 2022-02-04 15:26:36 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-02-04 15:26:36 +0100 |
commit | fe840ddad96259ed7b2f1d0d2f07bdf8d4c03384 (patch) | |
tree | 8a59e7eceaa1cfabb400f1fc2fbf0eaebf0d959f /sysdep/unix | |
parent | 14bb6fd29a1c88103e73138d5fd4396e610aa469 (diff) | |
parent | a9646efd40569f3a1d749bc1bd13219876b33a00 (diff) |
Merge commit 'a9646efd40569f3a1d749bc1bd13219876b33a00' into sark-bgp-rebased
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/io.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index e3e388af..0e5adc14 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -1463,6 +1463,10 @@ sk_open(sock *s) if (sk_set_high_port(s) < 0) log(L_WARN "Socket error: %s%#m", s->err); + if (s->flags & SKF_FREEBIND) + if (sk_set_freebind(s) < 0) + log(L_WARN "Socket error: %s%#m", s->err); + sockaddr_fill(&sa, s->af, bind_addr, s->iface, bind_port); if (bind(fd, &sa.sa, SA_LEN(sa)) < 0) ERR2("bind"); |