mirror of
				https://gitlab.labs.nic.cz/labs/bird.git
				synced 2024-05-11 16:54:54 +00:00 
			
		
		
		
	IO: Fix the previous bugfix
I should check it after making some trivial changes. The original patch from Alexander has it right.
This commit is contained in:
		@@ -1309,16 +1309,6 @@ sk_passive_connected(sock *s, int type)
 | 
			
		||||
    return 0;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (fd >= FD_SETSIZE)
 | 
			
		||||
  {
 | 
			
		||||
    /* FIXME: Call err_hook instead ? */
 | 
			
		||||
    log(L_ERR "SOCK: Incoming connection from %I%J (port %d) %s",
 | 
			
		||||
	t->daddr, ipa_is_link_local(t->daddr) ? t->iface : NULL,
 | 
			
		||||
	t->dport, "rejected due to FD_SETSIZE limit");
 | 
			
		||||
    close(fd);
 | 
			
		||||
    return 1;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  sock *t = sk_new(s->pool);
 | 
			
		||||
  t->type = type;
 | 
			
		||||
  t->fd = fd;
 | 
			
		||||
@@ -1338,6 +1328,18 @@ sk_passive_connected(sock *s, int type)
 | 
			
		||||
      log(L_WARN "SOCK: Cannot get remote IP address for TCP<");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (fd >= FD_SETSIZE)
 | 
			
		||||
  {
 | 
			
		||||
    /* FIXME: Call err_hook instead ? */
 | 
			
		||||
    log(L_ERR "SOCK: Incoming connection from %I%J (port %d) %s",
 | 
			
		||||
	t->daddr, ipa_is_link_local(t->daddr) ? t->iface : NULL,
 | 
			
		||||
	t->dport, "rejected due to FD_SETSIZE limit");
 | 
			
		||||
    close(fd);
 | 
			
		||||
    t->fd = -1;
 | 
			
		||||
    rfree(t);
 | 
			
		||||
    return 1;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (sk_setup(t) < 0)
 | 
			
		||||
  {
 | 
			
		||||
    /* FIXME: Call err_hook instead ? */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user