mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-17 08:38:42 +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:
parent
5004d02cb9
commit
2d785e8d6a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user