- /* --- Set it to allow address reuse --- */
-
- {
- int opt = 1;
- setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
- fdflags(fd, O_NONBLOCK, O_NONBLOCK, FD_CLOEXEC, FD_CLOEXEC);
- }
-
- /* --- Bind it to the right port --- */
-
- if (bind(fd, &ga->sa, ga->a.sz)) {
- fw_log(-1, "[%s] couldn't bind socket: %s", ss->s.desc, strerror(errno));
- goto fail_1;
- }
- if (ga->a.ops->bound)
- ga->a.ops->bound(&ga->a, ss->ao);
-