mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Fixes bug on TCP passive socket binding on BSD.
BGP on BSD was bound to random port. I am surprised that nobody noticed it already.
This commit is contained in:
@@ -934,7 +934,8 @@ sk_open(sock *s)
|
||||
}
|
||||
fill_in_sockaddr(&sa, s->saddr, port);
|
||||
#ifdef CONFIG_SKIP_MC_BIND
|
||||
if (type == SK_IP && bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0)
|
||||
if ((type != SK_UDP_MC) && (type != SK_IP_MC) &&
|
||||
bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0)
|
||||
#else
|
||||
if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user