]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Merge commit '8931425d02dd8656b48142f608d3119ab6f4a96f' into integrated
authorOndrej Zajicek <santiago@crfreenet.org>
Tue, 29 Apr 2014 14:05:47 +0000 (16:05 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 29 Apr 2014 14:05:47 +0000 (16:05 +0200)
Conflicts:

nest/rt-table.c

1  2 
nest/rt-table.c
sysdep/unix/io.c

diff --cc nest/rt-table.c
index 2606fd142cfd6624f31a5eebb56b293f6df1e3bd,fc55408146d81fcf7a42079f7dea65112daee10a..c8d0c1f73b06427b0f5267fb365fca41aaa2438c
@@@ -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;
index 3fe0fedf47c86cd004cec0b09c851990a2869554,51c6c0c150c0f2702345c84e06296f5317563f52..41dfc23a53be668d3fe43d65e32f4dd29b7951b3
@@@ -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)
      {