From: Ondrej Zajicek Date: Tue, 29 Apr 2014 14:05:47 +0000 (+0200) Subject: Merge commit '8931425d02dd8656b48142f608d3119ab6f4a96f' into integrated X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51e37fbb403a74787ff353cc54f223021763e76d;p=thirdparty%2Fbird.git Merge commit '8931425d02dd8656b48142f608d3119ab6f4a96f' into integrated Conflicts: nest/rt-table.c --- 51e37fbb403a74787ff353cc54f223021763e76d diff --cc nest/rt-table.c index 2606fd142,fc5540814..c8d0c1f73 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@@ -666,8 -660,8 +667,8 @@@ rte_recalculate(struct announce_hook *a { if (new) { - log(L_ERR "Pipe collision detected when sending %F to table %s", - log_rl(&rl_pipe, L_ERR "Pipe collision detected when sending %I/%d to table %s", - net->n.prefix, net->n.pxlen, table->name); ++ log_rl(&rl_pipe, L_ERR "Pipe collision detected when sending %F to table %s", + &net->n, table->name); rte_free_quick(new); } return; diff --cc sysdep/unix/io.c index 3fe0fedf4,51c6c0c15..41dfc23a5 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@@ -1258,21 -1179,30 +1258,30 @@@ sk_open(sock *s else { port = s->sport; + + int one = 1; if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) ERR("SO_REUSEADDR"); + + #ifdef CONFIG_NO_IFACE_BIND + /* Workaround missing ability to bind to an iface */ + if ((type == SK_UDP) && s->iface && ipa_zero(s->saddr)) + { + if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) < 0) + ERR("SO_REUSEPORT"); + } + #endif } - fill_in_sockaddr(&sa, s->saddr, s->iface, port); - if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) + + sockaddr_fill(sa, s->saddr, s->iface, port); + if (bind(fd, sa, sa_len) < 0) ERR("bind"); } - fill_in_sockaddr(&sa, s->daddr, s->iface, s->dport); + sockaddr_fill(sa, s->daddr, s->iface, s->dport); if (s->password) - { - int rv = sk_set_md5_auth_int(s, &sa, s->password); - if (rv < 0) - goto bad_no_log; - } + if (sk_set_md5_auth_int(s, sa, sa_len, s->password) < 0) + goto bad_no_log; switch (type) {